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

Side by Side Diff: chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.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 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 } 269 }
270 270
271 // Note: setting up the WebView class here, not the chrome.webview API. 271 // Note: setting up the WebView class here, not the chrome.webview API.
272 // The API will be automatically set up when first used. 272 // The API will be automatically set up when first used.
273 if (context->GetAvailability("webViewInternal").is_available()) { 273 if (context->GetAvailability("webViewInternal").is_available()) {
274 module_system->Require("chromeWebView"); 274 module_system->Require("chromeWebView");
275 if (context->GetAvailability("webViewExperimentalInternal") 275 if (context->GetAvailability("webViewExperimentalInternal")
276 .is_available()) { 276 .is_available()) {
277 module_system->Require("chromeWebViewExperimental"); 277 module_system->Require("chromeWebViewExperimental");
278 } 278 }
279 } else if (context_type == extensions::Feature::BLESSED_EXTENSION_CONTEXT) {
280 module_system->Require("denyWebView");
281 } 279 }
282 280
283 if (extensions::FeatureSwitch::app_view()->IsEnabled() && 281 if (extensions::FeatureSwitch::app_view()->IsEnabled() &&
284 context->GetAvailability("appViewEmbedderInternal").is_available()) { 282 context->GetAvailability("appViewEmbedderInternal").is_available()) {
285 module_system->Require("appView"); 283 module_system->Require("appView");
286 } else if (context_type == extensions::Feature::BLESSED_EXTENSION_CONTEXT) { 284 } else if (context_type == extensions::Feature::BLESSED_EXTENSION_CONTEXT) {
287 module_system->Require("denyAppView"); 285 module_system->Require("denyAppView");
288 } 286 }
289 287
290 if (extensions::FeatureSwitch::embedded_extension_options()->IsEnabled() && 288 if (extensions::FeatureSwitch::embedded_extension_options()->IsEnabled() &&
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 new extensions::PermissionSet(extensions::APIPermissionSet(), 344 new extensions::PermissionSet(extensions::APIPermissionSet(),
347 extensions::ManifestPermissionSet(), 345 extensions::ManifestPermissionSet(),
348 origin_set, 346 origin_set,
349 extensions::URLPatternSet())); 347 extensions::URLPatternSet()));
350 } 348 }
351 349
352 void ChromeExtensionsDispatcherDelegate::HandleWebRequestAPIUsage( 350 void ChromeExtensionsDispatcherDelegate::HandleWebRequestAPIUsage(
353 bool webrequest_used) { 351 bool webrequest_used) {
354 webrequest_used_ = webrequest_used; 352 webrequest_used_ = webrequest_used;
355 } 353 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698