diff --git a/sdk/lib/chrome/dart2js/chrome_dart2js.dart b/sdk/lib/_chrome/dart2js/chrome_dart2js.dart similarity index 99% rename from sdk/lib/chrome/dart2js/chrome_dart2js.dart rename to sdk/lib/_chrome/dart2js/chrome_dart2js.dart index 77338a8c306..93f8f752c59 100644 --- a/sdk/lib/chrome/dart2js/chrome_dart2js.dart +++ b/sdk/lib/_chrome/dart2js/chrome_dart2js.dart @@ -5,7 +5,7 @@ /// /// For more information on these APIs, see the /// [chrome.* API documentation](http://developer.chrome.com/apps/api_index.html). -library chrome; +library _chrome; import 'dart:_foreign_helper' show JS; import 'dart:_js_helper'; @@ -17,7 +17,7 @@ import 'dart:html'; // BSD-style license that can be found in the LICENSE file. // DO NOT EDIT -// Auto-generated dart:chrome library. +// Auto-generated dart:_chrome library. /* TODO(sashab): Add "show convertDartClosureToJS" once 'show' works. */ diff --git a/sdk/lib/chrome/dartium/chrome_dartium.dart b/sdk/lib/_chrome/dartium/chrome_dartium.dart similarity index 90% rename from sdk/lib/chrome/dartium/chrome_dartium.dart rename to sdk/lib/_chrome/dartium/chrome_dartium.dart index b741b3b7d1a..c16c9e5f71e 100644 --- a/sdk/lib/chrome/dartium/chrome_dartium.dart +++ b/sdk/lib/_chrome/dartium/chrome_dartium.dart @@ -5,12 +5,12 @@ /// /// For more information on these APIs, see the /// [Chrome APIs Documentation](http://developer.chrome.com/extensions/api_index.html) -library chrome; +library _chrome; // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // DO NOT EDIT -// Auto-generated dart:chrome library. +// Auto-generated dart:_chrome library. diff --git a/sdk/lib/_internal/libraries.dart b/sdk/lib/_internal/libraries.dart index fee473ed3ea..8da7a8ce3d8 100644 --- a/sdk/lib/_internal/libraries.dart +++ b/sdk/lib/_internal/libraries.dart @@ -27,9 +27,9 @@ const Map LIBRARIES = const { maturity: Maturity.STABLE, dart2jsPatchPath: "_internal/lib/async_patch.dart"), - "chrome": const LibraryInfo( - "chrome/dart2js/chrome_dart2js.dart", - maturity: Maturity.DEPRECATED, + "_chrome": const LibraryInfo( + "_chrome/dart2js/chrome_dart2js.dart", + documented: false, category: "Client"), "collection": const LibraryInfo( diff --git a/tests/chrome/chrome.status b/tests/_chrome/_chrome.status similarity index 100% rename from tests/chrome/chrome.status rename to tests/_chrome/_chrome.status diff --git a/tests/chrome/sample_test.dart b/tests/_chrome/sample_test.dart similarity index 76% rename from tests/chrome/sample_test.dart rename to tests/_chrome/sample_test.dart index 219a6007415..eb51d5cd65d 100644 --- a/tests/chrome/sample_test.dart +++ b/tests/_chrome/sample_test.dart @@ -5,19 +5,19 @@ library sample_test; import '../../pkg/unittest/lib/unittest.dart'; import '../../pkg/unittest/lib/html_config.dart'; -import 'dart:chrome' as chrome; +import 'dart:_chrome' as _chrome; main() { useHtmlConfiguration(); test('access', () { - var window = chrome.app.window; - expect(window is chrome.WindowModule, true); + var window = _chrome.app.window; + expect(window is _chrome.WindowModule, true); }); test('fails from browser', () { // APIs should not work in standard browser apps. expect(() { - chrome.app.window.create('foo.html'); + _chrome.app.window.create('foo.html'); }, throws); }); } diff --git a/tools/create_sdk.py b/tools/create_sdk.py index ecba37c724c..f70bdfcc7d1 100755 --- a/tools/create_sdk.py +++ b/tools/create_sdk.py @@ -194,13 +194,13 @@ def Main(argv): os.makedirs(join(LIB, 'html')) - for library in [join('_internal', 'compiler'), + for library in [join('_chrome', 'dart2js'), join('_chrome', 'dartium'), + join('_internal', 'compiler'), join('_internal', 'dartdoc'), join('_internal', 'pub', 'resource'), join('_internal', 'lib'), 'async', 'collection', '_collection_dev', 'convert', 'core', 'crypto', 'io', 'isolate', - join('chrome', 'dart2js'), join('chrome', 'dartium'), join('html', 'dart2js'), join('html', 'dartium'), join('html', 'html_common'), join('indexed_db', 'dart2js'), join('indexed_db', 'dartium'), diff --git a/tools/dom/scripts/chromegenerator.py b/tools/dom/scripts/chromegenerator.py index 73d504c8dd5..e537c85bc03 100755 --- a/tools/dom/scripts/chromegenerator.py +++ b/tools/dom/scripts/chromegenerator.py @@ -17,10 +17,10 @@ COMPILER = "../../../third_party/chrome/tools/json_schema_compiler/compiler.py" API_DIR = "../../../third_party/chrome/idl/" # The path to the custom overrides directory, containing override files. -OVERRIDES_DIR = "../src/chrome/custom_dart/" +OVERRIDES_DIR = "../src/_chrome/custom_dart/" # The path to where the generated .dart files should be saved. -OUTPUT_DIR = "../src/chrome/" +OUTPUT_DIR = "../src/_chrome/" # The path to where the output template file is. This file will be populated # with TEMPLATE_CONTENT, followed by the list of generated .dart files. @@ -34,7 +34,7 @@ TEMPLATE_CONTENT = """ // BSD-style license that can be found in the LICENSE file. // DO NOT EDIT -// Auto-generated dart:chrome library. +// Auto-generated dart:_chrome library. /// Native wrappers for the Chrome packaged app APIs. /// @@ -43,7 +43,7 @@ TEMPLATE_CONTENT = """ /// /// For more information on these APIs, see the /// [chrome.* API documentation](http://developer.chrome.com/apps/api_index.html). -library chrome; +library _chrome; import 'dart:_foreign_helper' show JS; /* TODO(sashab): Add "show convertDartClosureToJS" once 'show' works. */ @@ -51,15 +51,15 @@ import 'dart:_js_helper'; import 'dart:html_common'; import 'dart:html'; -part "$AUXILIARY_DIR/chrome/utils.dart"; -part "$AUXILIARY_DIR/chrome/chrome.dart"; +part "$AUXILIARY_DIR/_chrome/utils.dart"; +part "$AUXILIARY_DIR/_chrome/_chrome.dart"; // Generated files below this line. """ # The format for adding files to TEMPLATE_CONTENT. Will be substituted with the # filename (not including the extension) of the IDL/JSON file. -TEMPLATE_FILE_FORMAT = 'part "$AUXILIARY_DIR/chrome/%s.dart";' +TEMPLATE_FILE_FORMAT = 'part "$AUXILIARY_DIR/_chrome/%s.dart";' # A list of schema files to generate. # TODO(sashab): Later, use the ones from API_DIR/api.gyp and diff --git a/tools/dom/src/chrome/app_runtime.dart b/tools/dom/src/_chrome/app_runtime.dart similarity index 100% rename from tools/dom/src/chrome/app_runtime.dart rename to tools/dom/src/_chrome/app_runtime.dart diff --git a/tools/dom/src/chrome/app_window.dart b/tools/dom/src/_chrome/app_window.dart similarity index 100% rename from tools/dom/src/chrome/app_window.dart rename to tools/dom/src/_chrome/app_window.dart diff --git a/tools/dom/src/chrome/chrome.dart b/tools/dom/src/_chrome/chrome.dart similarity index 100% rename from tools/dom/src/chrome/chrome.dart rename to tools/dom/src/_chrome/chrome.dart diff --git a/tools/dom/src/chrome/custom_dart/app_window.AppWindow.contentWindow.dart b/tools/dom/src/_chrome/custom_dart/app_window.AppWindow.contentWindow.dart similarity index 100% rename from tools/dom/src/chrome/custom_dart/app_window.AppWindow.contentWindow.dart rename to tools/dom/src/_chrome/custom_dart/app_window.AppWindow.contentWindow.dart diff --git a/tools/dom/src/chrome/custom_dart/app_window.AppWindow.getBounds.dart b/tools/dom/src/_chrome/custom_dart/app_window.AppWindow.getBounds.dart similarity index 100% rename from tools/dom/src/chrome/custom_dart/app_window.AppWindow.getBounds.dart rename to tools/dom/src/_chrome/custom_dart/app_window.AppWindow.getBounds.dart diff --git a/tools/dom/src/chrome/custom_dart/app_window.create.dart b/tools/dom/src/_chrome/custom_dart/app_window.create.dart similarity index 100% rename from tools/dom/src/chrome/custom_dart/app_window.create.dart rename to tools/dom/src/_chrome/custom_dart/app_window.create.dart diff --git a/tools/dom/src/chrome/custom_dart/app_window.current.dart b/tools/dom/src/_chrome/custom_dart/app_window.current.dart similarity index 100% rename from tools/dom/src/chrome/custom_dart/app_window.current.dart rename to tools/dom/src/_chrome/custom_dart/app_window.current.dart diff --git a/tools/dom/src/chrome/file_system.dart b/tools/dom/src/_chrome/file_system.dart similarity index 100% rename from tools/dom/src/chrome/file_system.dart rename to tools/dom/src/_chrome/file_system.dart diff --git a/tools/dom/src/chrome/utils.dart b/tools/dom/src/_chrome/utils.dart similarity index 100% rename from tools/dom/src/chrome/utils.dart rename to tools/dom/src/_chrome/utils.dart diff --git a/tools/dom/templates/html/dart2js/chrome_dart2js.darttemplate b/tools/dom/templates/html/dart2js/chrome_dart2js.darttemplate index 2ea934d250f..8cfc7a3aa98 100644 --- a/tools/dom/templates/html/dart2js/chrome_dart2js.darttemplate +++ b/tools/dom/templates/html/dart2js/chrome_dart2js.darttemplate @@ -21,10 +21,10 @@ import 'dart:_js_helper'; import 'dart:html_common'; import 'dart:html'; -part "$AUXILIARY_DIR/chrome/utils.dart"; -part "$AUXILIARY_DIR/chrome/chrome.dart"; +part "$AUXILIARY_DIR/_chrome/utils.dart"; +part "$AUXILIARY_DIR/_chrome/_chrome.dart"; // Generated files below this line. -part "$AUXILIARY_DIR/chrome/app_window.dart"; -part "$AUXILIARY_DIR/chrome/app_runtime.dart"; -part "$AUXILIARY_DIR/chrome/file_system.dart"; \ No newline at end of file +part "$AUXILIARY_DIR/_chrome/app_window.dart"; +part "$AUXILIARY_DIR/_chrome/app_runtime.dart"; +part "$AUXILIARY_DIR/_chrome/file_system.dart"; diff --git a/tools/dom/templates/html/dartium/chrome_dartium.darttemplate b/tools/dom/templates/html/dartium/chrome_dartium.darttemplate index 03a6cb49788..cc513c75aa4 100644 --- a/tools/dom/templates/html/dartium/chrome_dartium.darttemplate +++ b/tools/dom/templates/html/dartium/chrome_dartium.darttemplate @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. // DO NOT EDIT -// Auto-generated dart:chrome library. +// Auto-generated dart:_chrome library. /// Native wrappers for the Chrome Packaged App APIs. /// @@ -12,4 +12,4 @@ /// /// For more information on these APIs, see the /// [Chrome APIs Documentation](http://developer.chrome.com/extensions/api_index.html) -library chrome; +library _chrome;