| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.h" | 5 #include "chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/sha1.h" | 8 #include "base/sha1.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 239 |
| 240 // Note: setting up the WebView class here, not the chrome.webview API. | 240 // Note: setting up the WebView class here, not the chrome.webview API. |
| 241 // The API will be automatically set up when first used. | 241 // The API will be automatically set up when first used. |
| 242 if (context->GetAvailability("webViewInternal").is_available()) { | 242 if (context->GetAvailability("webViewInternal").is_available()) { |
| 243 module_system->Require("chromeWebView"); | 243 module_system->Require("chromeWebView"); |
| 244 if (context->GetAvailability("webViewExperimentalInternal") | 244 if (context->GetAvailability("webViewExperimentalInternal") |
| 245 .is_available()) { | 245 .is_available()) { |
| 246 module_system->Require("chromeWebViewExperimental"); | 246 module_system->Require("chromeWebViewExperimental"); |
| 247 } | 247 } |
| 248 } | 248 } |
| 249 | |
| 250 if (context->GetAvailability("extensionOptionsInternal").is_available()) { | |
| 251 module_system->Require("extensionOptions"); | |
| 252 } | |
| 253 } | 249 } |
| 254 | 250 |
| 255 void ChromeExtensionsDispatcherDelegate::OnActiveExtensionsUpdated( | 251 void ChromeExtensionsDispatcherDelegate::OnActiveExtensionsUpdated( |
| 256 const std::set<std::string>& extension_ids) { | 252 const std::set<std::string>& extension_ids) { |
| 257 // In single-process mode, the browser process reports the active extensions. | 253 // In single-process mode, the browser process reports the active extensions. |
| 258 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 254 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 259 ::switches::kSingleProcess)) | 255 ::switches::kSingleProcess)) |
| 260 return; | 256 return; |
| 261 crash_keys::SetActiveExtensions(extension_ids); | 257 crash_keys::SetActiveExtensions(extension_ids); |
| 262 } | 258 } |
| 263 | 259 |
| 264 void ChromeExtensionsDispatcherDelegate::SetChannel(int channel) { | 260 void ChromeExtensionsDispatcherDelegate::SetChannel(int channel) { |
| 265 extensions::SetCurrentChannel( | 261 extensions::SetCurrentChannel( |
| 266 static_cast<chrome::VersionInfo::Channel>(channel)); | 262 static_cast<chrome::VersionInfo::Channel>(channel)); |
| 267 } | 263 } |
| OLD | NEW |