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

Side by Side Diff: chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc

Issue 667453003: First stage of launch for embedded options pages. With this patch, 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 unified diff | Download patch
OLDNEW
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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 // Note: setting up the WebView class here, not the chrome.webview API. 261 // Note: setting up the WebView class here, not the chrome.webview API.
262 // The API will be automatically set up when first used. 262 // The API will be automatically set up when first used.
263 if (context->GetAvailability("webViewInternal").is_available()) { 263 if (context->GetAvailability("webViewInternal").is_available()) {
264 module_system->Require("chromeWebView"); 264 module_system->Require("chromeWebView");
265 if (context->GetAvailability("webViewExperimentalInternal") 265 if (context->GetAvailability("webViewExperimentalInternal")
266 .is_available()) { 266 .is_available()) {
267 module_system->Require("chromeWebViewExperimental"); 267 module_system->Require("chromeWebViewExperimental");
268 } 268 }
269 } 269 }
270 270
271 if (extensions::FeatureSwitch::embedded_extension_options()->IsEnabled() && 271 if (context->GetAvailability("extensionOptionsInternal").is_available()) {
272 context->GetAvailability("extensionOptionsInternal").is_available()) {
273 module_system->Require("extensionOptions"); 272 module_system->Require("extensionOptions");
274 } 273 }
275 } 274 }
276 275
277 void ChromeExtensionsDispatcherDelegate::OnActiveExtensionsUpdated( 276 void ChromeExtensionsDispatcherDelegate::OnActiveExtensionsUpdated(
278 const std::set<std::string>& extension_ids) { 277 const std::set<std::string>& extension_ids) {
279 // In single-process mode, the browser process reports the active extensions. 278 // In single-process mode, the browser process reports the active extensions.
280 if (CommandLine::ForCurrentProcess()->HasSwitch(::switches::kSingleProcess)) 279 if (CommandLine::ForCurrentProcess()->HasSwitch(::switches::kSingleProcess))
281 return; 280 return;
282 crash_keys::SetActiveExtensions(extension_ids); 281 crash_keys::SetActiveExtensions(extension_ids);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 if (!extension) 321 if (!extension)
323 return; 322 return;
324 323
325 extension->permissions_data()->UpdateTabSpecificPermissions( 324 extension->permissions_data()->UpdateTabSpecificPermissions(
326 tab_id, 325 tab_id,
327 new extensions::PermissionSet(extensions::APIPermissionSet(), 326 new extensions::PermissionSet(extensions::APIPermissionSet(),
328 extensions::ManifestPermissionSet(), 327 extensions::ManifestPermissionSet(),
329 origin_set, 328 origin_set,
330 extensions::URLPatternSet())); 329 extensions::URLPatternSet()));
331 } 330 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698