Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: extensions/common/extension_api.cc

Issue 404883002: Allow extension APIs to be called from WebUI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android compile Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/common/extension_api.h ('k') | extensions/common/extension_api_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/extension_api.cc
diff --git a/extensions/common/extension_api.cc b/extensions/common/extension_api.cc
index 6f67887cde87993c6d7d351b9f4b49d25483dea0..3f1748839a9892633d68e85ac14ea298970f9d1d 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;
« no previous file with comments | « extensions/common/extension_api.h ('k') | extensions/common/extension_api_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698