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

Unified Diff: extensions/renderer/dispatcher.cc

Issue 566863004: Enabling webview in app_shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn Created 6 years, 3 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 163218c0e92ed293c1b1e54e991962eb36d6014c..80ee4ecd45f98ea75a24e203a254afdee5039167 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -323,6 +323,18 @@ void Dispatcher::DidCreateScriptContext(
module_system->Require("platformApp");
}
+ // 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()) {
+ module_system->Require("webView");
+ if (context->GetAvailability("webViewExperimentalInternal")
+ .is_available()) {
+ module_system->Require("webViewExperimental");
+ }
+ } else if (context_type == extensions::Feature::BLESSED_EXTENSION_CONTEXT) {
+ module_system->Require("denyWebView");
+ }
+
delegate_->RequireAdditionalModules(context, is_within_platform_app);
VLOG(1) << "Num tracked contexts: " << script_context_set_.size();

Powered by Google App Engine
This is Rietveld 408576698