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

Unified Diff: extensions/renderer/dispatcher.cc

Issue 642863003: Moving last app_view bits to extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
Index: extensions/renderer/dispatcher.cc
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
index efa95bb9f958e1f799ce56f5077326cace898ea6..5b4f93223496afc9ba10d5adee1e25f014cbb94e 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -324,6 +324,12 @@ void Dispatcher::DidCreateScriptContext(
module_system->Require("platformApp");
}
+ if (context->GetAvailability("appViewEmbedderInternal").is_available()) {
+ module_system->Require("appView");
+ } else if (context_type == extensions::Feature::BLESSED_EXTENSION_CONTEXT) {
+ module_system->Require("denyAppView");
+ }
+
// Note: setting up the WebView class here, not the chrome.webview API.
// The API will be automatically set up when first used.
if (context->GetAvailability("webViewInternal").is_available()) {
@@ -513,6 +519,8 @@ std::vector<std::pair<std::string, int> > Dispatcher::GetJsResources() {
std::vector<std::pair<std::string, int> > resources;
// Libraries.
+ resources.push_back(std::make_pair("appView", IDR_APP_VIEW_JS));
+ resources.push_back(std::make_pair("denyAppView", IDR_APP_VIEW_DENY_JS));
resources.push_back(std::make_pair("entryIdManager", IDR_ENTRY_ID_MANAGER));
resources.push_back(std::make_pair(kEventBindings, IDR_EVENT_BINDINGS_JS));
resources.push_back(std::make_pair("imageUtil", IDR_IMAGE_UTIL_JS));

Powered by Google App Engine
This is Rietveld 408576698