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

Unified Diff: chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc

Issue 353013007: Implement <appview> skeleton. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@app_view_skeleton
Patch Set: Addressed comments Created 6 years, 6 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: chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc
diff --git a/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc b/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc
index 08bc023906c2e53f5ed4ff9d4f86935f8492bb09..daebbe83ef9d716ccffe4a66b25bf90c304c5a90 100644
--- a/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc
+++ b/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc
@@ -235,6 +235,7 @@ void ChromeExtensionsDispatcherDelegate::PopulateSourceMap(
IDR_CHROME_DIRECT_SETTING_JS);
// Platform app sources that are not API-specific..
+ source_map->RegisterSource("appView", IDR_APP_VIEW_JS);
source_map->RegisterSource("tagWatcher", IDR_TAG_WATCHER_JS);
source_map->RegisterSource("webViewInternal",
IDR_WEB_VIEW_INTERNAL_CUSTOM_BINDINGS_JS);
@@ -294,6 +295,14 @@ void ChromeExtensionsDispatcherDelegate::RequireAdditionalModules(
module_system->Require("denyWebView");
}
}
+
+ if (context_type == extensions::Feature::BLESSED_EXTENSION_CONTEXT) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAppView) &&
+ extension->permissions_data()->HasAPIPermission(
+ extensions::APIPermission::kAppView)) {
+ module_system->Require("appView");
+ }
not at google - send to devlin 2014/06/27 17:32:19 questions: - why is this different logic to webvie
Fady Samuel 2014/06/27 18:14:31 1. <webview> will work in unblessed contexts in th
not at google - send to devlin 2014/06/27 18:16:17 So the "unblessed" isn't needed yet? can we take t
+ }
}
void ChromeExtensionsDispatcherDelegate::OnActiveExtensionsUpdated(

Powered by Google App Engine
This is Rietveld 408576698