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

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

Issue 2551303003: Remove unused packaged app window controls code. (Closed)
Patch Set: Nit Created 4 years 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 745f2b992b4d19168d49907875e098a19ba37f6b..1d49fb3659bb9cd51849901fd4d5e1fd55c36702 100644
--- a/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc
+++ b/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc
@@ -261,33 +261,20 @@ void ChromeExtensionsDispatcherDelegate::PopulateSourceMap(
// Platform app sources that are not API-specific..
source_map->RegisterSource("fileEntryBindingUtil",
IDR_FILE_ENTRY_BINDING_UTIL_JS);
- source_map->RegisterSource("tagWatcher", IDR_TAG_WATCHER_JS);
source_map->RegisterSource("chromeWebViewInternal",
IDR_CHROME_WEB_VIEW_INTERNAL_CUSTOM_BINDINGS_JS);
source_map->RegisterSource("chromeWebView", IDR_CHROME_WEB_VIEW_JS);
}
void ChromeExtensionsDispatcherDelegate::RequireAdditionalModules(
- extensions::ScriptContext* context,
- bool is_within_platform_app) {
- extensions::ModuleSystem* module_system = context->module_system();
- extensions::Feature::Context context_type = context->context_type();
-
- // TODO(kalman, fsamuel): Eagerly calling Require on context startup is
- // expensive. It would be better if there were a light way of detecting when
- // a webview or appview is created and only then set up the infrastructure.
- if (context_type == extensions::Feature::BLESSED_EXTENSION_CONTEXT &&
- is_within_platform_app &&
- extensions::GetCurrentChannel() <= version_info::Channel::DEV &&
- base::CommandLine::ForCurrentProcess()->HasSwitch(
- extensions::switches::kEnableAppWindowControls)) {
- module_system->Require("windowControls");
- }
-
+ extensions::ScriptContext* context) {
// 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("chromeWebView");
+ // TODO(fsamuel): Eagerly calling Require on context startup is expensive.
+ // It would be better if there were a light way of detecting when a webview
+ // or appview is created and only then set up the infrastructure.
+ context->module_system()->Require("chromeWebView");
}
}

Powered by Google App Engine
This is Rietveld 408576698