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

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

Issue 486903002: Moving app_view to extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | extensions/browser/api/extensions_api_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 18 matching lines...) Expand all
29 #include "chrome/renderer/extensions/tabs_custom_bindings.h" 29 #include "chrome/renderer/extensions/tabs_custom_bindings.h"
30 #include "chrome/renderer/extensions/webstore_bindings.h" 30 #include "chrome/renderer/extensions/webstore_bindings.h"
31 #include "content/public/renderer/render_thread.h" 31 #include "content/public/renderer/render_thread.h"
32 #include "content/public/renderer/render_view.h" 32 #include "content/public/renderer/render_view.h"
33 #include "extensions/common/extension.h" 33 #include "extensions/common/extension.h"
34 #include "extensions/common/feature_switch.h" 34 #include "extensions/common/feature_switch.h"
35 #include "extensions/common/permissions/api_permission_set.h" 35 #include "extensions/common/permissions/api_permission_set.h"
36 #include "extensions/common/permissions/manifest_permission_set.h" 36 #include "extensions/common/permissions/manifest_permission_set.h"
37 #include "extensions/common/permissions/permission_set.h" 37 #include "extensions/common/permissions/permission_set.h"
38 #include "extensions/common/permissions/permissions_data.h" 38 #include "extensions/common/permissions/permissions_data.h"
39 #include "extensions/common/switches.h"
39 #include "extensions/common/url_pattern_set.h" 40 #include "extensions/common/url_pattern_set.h"
40 #include "extensions/renderer/dispatcher.h" 41 #include "extensions/renderer/dispatcher.h"
41 #include "extensions/renderer/native_handler.h" 42 #include "extensions/renderer/native_handler.h"
42 #include "extensions/renderer/resource_bundle_source_map.h" 43 #include "extensions/renderer/resource_bundle_source_map.h"
43 #include "extensions/renderer/script_context.h" 44 #include "extensions/renderer/script_context.h"
44 #include "third_party/WebKit/public/platform/WebString.h" 45 #include "third_party/WebKit/public/platform/WebString.h"
45 #include "third_party/WebKit/public/web/WebDocument.h" 46 #include "third_party/WebKit/public/web/WebDocument.h"
46 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" 47 #include "third_party/WebKit/public/web/WebSecurityPolicy.h"
47 #include "third_party/WebKit/public/web/WebView.h" 48 #include "third_party/WebKit/public/web/WebView.h"
48 49
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 module_system->Require("webViewExperimental"); 309 module_system->Require("webViewExperimental");
309 } 310 }
310 } 311 }
311 } else { 312 } else {
312 module_system->Require("denyWebView"); 313 module_system->Require("denyWebView");
313 } 314 }
314 } 315 }
315 316
316 if (context_type == extensions::Feature::BLESSED_EXTENSION_CONTEXT) { 317 if (context_type == extensions::Feature::BLESSED_EXTENSION_CONTEXT) {
317 // TODO(fsamuel): Use context->GetAvailability("appViewInternal"). 318 // TODO(fsamuel): Use context->GetAvailability("appViewInternal").
318 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAppView) && 319 if (CommandLine::ForCurrentProcess()->HasSwitch(
320 extensions::switches::kEnableAppView) &&
319 extension->permissions_data()->HasAPIPermission( 321 extension->permissions_data()->HasAPIPermission(
320 extensions::APIPermission::kAppView)) { 322 extensions::APIPermission::kAppView)) {
321 module_system->Require("appView"); 323 module_system->Require("appView");
322 } else { 324 } else {
323 module_system->Require("denyAppView"); 325 module_system->Require("denyAppView");
324 } 326 }
325 } 327 }
326 328
327 if (extensions::FeatureSwitch::embedded_extension_options()->IsEnabled() && 329 if (extensions::FeatureSwitch::embedded_extension_options()->IsEnabled() &&
328 context->GetAvailability("extensionOptionsInternal").is_available()) { 330 context->GetAvailability("extensionOptionsInternal").is_available()) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 new extensions::PermissionSet(extensions::APIPermissionSet(), 385 new extensions::PermissionSet(extensions::APIPermissionSet(),
384 extensions::ManifestPermissionSet(), 386 extensions::ManifestPermissionSet(),
385 origin_set, 387 origin_set,
386 extensions::URLPatternSet())); 388 extensions::URLPatternSet()));
387 } 389 }
388 390
389 void ChromeExtensionsDispatcherDelegate::HandleWebRequestAPIUsage( 391 void ChromeExtensionsDispatcherDelegate::HandleWebRequestAPIUsage(
390 bool webrequest_used) { 392 bool webrequest_used) {
391 webrequest_used_ = webrequest_used; 393 webrequest_used_ = webrequest_used;
392 } 394 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | extensions/browser/api/extensions_api_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698