summaryrefslogtreecommitdiffstats
path: root/extensions/shell/common
diff options
context:
space:
mode:
authorjamescook <jamescook@chromium.org>2014-09-15 11:27:13 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-15 18:31:44 +0000
commit877e2ab661da959e844d0f0f1e71f815d32d8c77 (patch)
tree5fc270aa7330836c0e8070f2c0a642cb973438d5 /extensions/shell/common
parente380f604301c5cdde7d0fad496a5d46c80233afc (diff)
downloadchromium_src-877e2ab661da959e844d0f0f1e71f815d32d8c77.zip
chromium_src-877e2ab661da959e844d0f0f1e71f815d32d8c77.tar.gz
chromium_src-877e2ab661da959e844d0f0f1e71f815d32d8c77.tar.bz2
Remove app_shell chrome.shell API and ShellAppWindow
The chrome.app.window API has been moved to src/extensions, so app_shell no longer needs its custom chrome.shell API to open windows. * Remove the API implementation -- mostly a manual revert of https://codereview.chromium.org/254473011/ * Remove app_shell_resources.grd since there are no more app_shell resources * Remove athena's support for ShellAppWindow * Fix example apps to remove the chrome.shell workaround. No presubmit because it has a false-positive warning about the enum rename in extension_function_histogram_value.h No try because no presubmit doesn't seem to work by itself. BUG=413164 TEST=extensions_unittests, app_shell_unittests, app_shell_browsertests TBR=isherman@chromium.org for deprecating an extension function histogram NOPRESUBMIT=true NOTRY=true Review URL: https://codereview.chromium.org/571643003 Cr-Commit-Position: refs/heads/master@{#294852}
Diffstat (limited to 'extensions/shell/common')
-rw-r--r--extensions/shell/common/api/_api_features.json18
-rw-r--r--extensions/shell/common/api/api.gyp19
-rw-r--r--extensions/shell/common/api/schemas.gypi20
-rw-r--r--extensions/shell/common/api/shell.idl36
-rw-r--r--extensions/shell/common/shell_extensions_client.cc14
5 files changed, 1 insertions, 106 deletions
diff --git a/extensions/shell/common/api/_api_features.json b/extensions/shell/common/api/_api_features.json
deleted file mode 100644
index bcb5f71..0000000
--- a/extensions/shell/common/api/_api_features.json
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This features file defines extension APIs implemented under src/extensions/shell.
-// See extensions/common/features/* to understand this file, in particular
-// feature.h, simple_feature.h, and base_feature_provider.h.
-//
-// Note that specifying "web_page", "blessed_web_page", or "all" as a context
-// type will require manually updating chrome/renderer/resources/dispatcher.cc.
-
-{
- "shell": {
- "channel": "dev",
- "contexts": ["blessed_extension"],
- "extension_types": ["platform_app"]
- }
-}
diff --git a/extensions/shell/common/api/api.gyp b/extensions/shell/common/api/api.gyp
deleted file mode 100644
index 3421f05..0000000
--- a/extensions/shell/common/api/api.gyp
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'shell_api',
- 'type': 'static_library',
- # TODO(jschuh): http://crbug.com/167187 size_t -> int
- 'msvs_disabled_warnings': [ 4267 ],
- 'includes': [
- '../../../../build/json_schema_bundle_compile.gypi',
- '../../../../build/json_schema_compile.gypi',
- 'schemas.gypi',
- ],
- },
- ],
-}
diff --git a/extensions/shell/common/api/schemas.gypi b/extensions/shell/common/api/schemas.gypi
deleted file mode 100644
index 0524e13..0000000
--- a/extensions/shell/common/api/schemas.gypi
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'sources': [
- '<@(schema_files)',
- ],
- 'variables': {
- 'chromium_code': 1,
- 'non_compiled_schema_files': [
- ],
- 'schema_files': [
- 'shell.idl',
- ],
- 'cc_dir': 'extensions/shell/common/api',
- 'root_namespace': 'extensions::shell_api::%(namespace)s',
- 'impl_dir_': 'extensions/shell/browser/api',
- },
-}
diff --git a/extensions/shell/common/api/shell.idl b/extensions/shell/common/api/shell.idl
deleted file mode 100644
index 0259535..0000000
--- a/extensions/shell/common/api/shell.idl
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Use the <code>chrome.shell</code> API to create windows. The
-// <code>createWindow</code> API is a subset of
-// <code>chrome.app.window.create</code>.
-namespace shell {
-
- // Called in the creating window (parent) before the load event is called in
- // the created window (child). The parent can set fields or functions on the
- // child usable from onload. E.g. background.js:<br>
- // <code>function(createdWindow) { createdWindow.contentWindow.foo =
- // function () { }; };</code>
- // <br>window.js:<br>
- // <code>window.onload = function () { foo(); }</code>
- callback CreateWindowCallback =
- void ([instanceOf=AppWindow] object createdWindow);
-
- [noinline_doc] dictionary AppWindow {
- // The JavaScript 'window' object for the created child.
- [instanceOf=Window] object contentWindow;
- };
-
- interface Functions {
- // Creates a fullscreen window on the default display. Options are ignored.
- static void createWindow(DOMString url,
- optional object optionsPlaceholder,
- optional CreateWindowCallback callback);
-
- // Returns an $(ref:AppWindow) object for the current script context
- // (i.e. JavaScript 'window' object).
- [nocompile] static AppWindow currentWindow();
- [nocompile, nodoc] static void initializeAppWindow();
- };
-};
diff --git a/extensions/shell/common/shell_extensions_client.cc b/extensions/shell/common/shell_extensions_client.cc
index 0036219..be135c7 100644
--- a/extensions/shell/common/shell_extensions_client.cc
+++ b/extensions/shell/common/shell_extensions_client.cc
@@ -20,8 +20,6 @@
#include "extensions/common/permissions/permissions_info.h"
#include "extensions/common/permissions/permissions_provider.h"
#include "extensions/common/url_pattern_set.h"
-#include "extensions/shell/common/api/generated_schemas.h"
-#include "grit/app_shell_resources.h"
#include "grit/extensions_resources.h"
namespace extensions {
@@ -135,7 +133,6 @@ ShellExtensionsClient::CreateFeatureProviderSource(
new JSONFeatureProviderSource(name));
if (name == "api") {
source->LoadJSON(IDR_EXTENSION_API_FEATURES);
- source->LoadJSON(IDR_SHELL_EXTENSION_API_FEATURES);
} else if (name == "manifest") {
source->LoadJSON(IDR_EXTENSION_MANIFEST_FEATURES);
} else if (name == "permission") {
@@ -180,20 +177,11 @@ bool ShellExtensionsClient::IsScriptableURL(const GURL& url,
bool ShellExtensionsClient::IsAPISchemaGenerated(
const std::string& name) const {
- // TODO(rockot): Remove dependency on src/chrome once we have some core APIs
- // moved out. See http://crbug.com/349042.
- // Special-case our simplified app.runtime implementation because we don't
- // have the Chrome app APIs available.
- return core_api::GeneratedSchemas::IsGenerated(name) ||
- shell_api::GeneratedSchemas::IsGenerated(name);
+ return core_api::GeneratedSchemas::IsGenerated(name);
}
base::StringPiece ShellExtensionsClient::GetAPISchema(
const std::string& name) const {
- // Schema for chrome.shell APIs.
- if (shell_api::GeneratedSchemas::IsGenerated(name))
- return shell_api::GeneratedSchemas::Get(name);
-
return core_api::GeneratedSchemas::Get(name);
}