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

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

Issue 11340019: Place <webview> tag behind a flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed WebViewTest.* Created 8 years, 1 month 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/renderer/chrome_content_renderer_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/dispatcher.h" 5 #include "chrome/renderer/extensions/dispatcher.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/string_piece.h" 10 #include "base/string_piece.h"
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 796
797 break; 797 break;
798 } 798 }
799 } 799 }
800 800
801 // Inject custom JS into the platform app context. 801 // Inject custom JS into the platform app context.
802 if (IsWithinPlatformApp(frame)) 802 if (IsWithinPlatformApp(frame))
803 module_system->Require("platformApp"); 803 module_system->Require("platformApp");
804 804
805 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT && 805 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT &&
806 (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableWebView) ||
807 (CommandLine::ForCurrentProcess()->HasSwitch(
808 switches::kEnableBrowserPluginForAllViewTypes))) &&
806 extension->HasAPIPermission(APIPermission::kWebView)) { 809 extension->HasAPIPermission(APIPermission::kWebView)) {
807 module_system->Require("webview"); 810 module_system->Require("webview");
808 } 811 }
809 812
810 context->set_module_system(module_system.Pass()); 813 context->set_module_system(module_system.Pass());
811 814
812 context->DispatchOnLoadEvent( 815 context->DispatchOnLoadEvent(
813 ChromeRenderProcessObserver::is_incognito_process(), 816 ChromeRenderProcessObserver::is_incognito_process(),
814 manifest_version); 817 manifest_version);
815 818
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 // we should abort. 1122 // we should abort.
1120 WebKit::WebFrame* frame = context->web_frame(); 1123 WebKit::WebFrame* frame = context->web_frame();
1121 ExtensionURLInfo url_info(frame->document().securityOrigin(), 1124 ExtensionURLInfo url_info(frame->document().securityOrigin(),
1122 UserScriptSlave::GetDataSourceURLForFrame(frame)); 1125 UserScriptSlave::GetDataSourceURLForFrame(frame));
1123 CHECK(!extensions_.IsSandboxedPage(url_info)); 1126 CHECK(!extensions_.IsSandboxedPage(url_info));
1124 1127
1125 return true; 1128 return true;
1126 } 1129 }
1127 1130
1128 } // namespace extensions 1131 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698