summaryrefslogtreecommitdiffstats
path: root/extensions/common/extension_api.cc
diff options
context:
space:
mode:
authorkalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-24 12:48:09 +0000
committerkalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-24 12:48:09 +0000
commit2c6e3b04ca361d052f1e8fdc70983bcc7c379dba (patch)
treebd66104e12f20722fc475c400714efa9a74fbc81 /extensions/common/extension_api.cc
parent21a73e99ae6db69d2204d16d9a1e03a54ab98584 (diff)
downloadchromium_src-2c6e3b04ca361d052f1e8fdc70983bcc7c379dba.zip
chromium_src-2c6e3b04ca361d052f1e8fdc70983bcc7c379dba.tar.gz
chromium_src-2c6e3b04ca361d052f1e8fdc70983bcc7c379dba.tar.bz2
Allow extension APIs to be called from WebUI. The only API currently
available is chrome.test, but the internal APIs used for <webview> and <extensionoptions> will be next. It also provides an alternative to chrome.send in theory. BUG=391944 R=rockot@chromium.org, jam@chromium.org Review URL: https://codereview.chromium.org/404883002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285217 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/common/extension_api.cc')
-rw-r--r--extensions/common/extension_api.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/extensions/common/extension_api.cc b/extensions/common/extension_api.cc
index 6f67887..3f17488 100644
--- a/extensions/common/extension_api.cc
+++ b/extensions/common/extension_api.cc
@@ -303,6 +303,10 @@ bool ExtensionAPI::IsAvailableInUntrustedContext(const std::string& name,
.is_available();
}
+bool ExtensionAPI::IsAvailableToWebUI(const std::string& name) {
+ return IsAvailable(name, NULL, Feature::WEBUI_CONTEXT, GURL()).is_available();
+}
+
const base::DictionaryValue* ExtensionAPI::GetSchema(
const std::string& full_name) {
std::string child_name;