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

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

Issue 11052019: <browser> Make new implementation the default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove flag from chrome://flags, add platform app check for both implementation. Created 8 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 | Annotate | Revision Log
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 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 source_map_.RegisterSource("tabs", IDR_TABS_CUSTOM_BINDINGS_JS); 685 source_map_.RegisterSource("tabs", IDR_TABS_CUSTOM_BINDINGS_JS);
686 source_map_.RegisterSource("tts", IDR_TTS_CUSTOM_BINDINGS_JS); 686 source_map_.RegisterSource("tts", IDR_TTS_CUSTOM_BINDINGS_JS);
687 source_map_.RegisterSource("ttsEngine", IDR_TTS_ENGINE_CUSTOM_BINDINGS_JS); 687 source_map_.RegisterSource("ttsEngine", IDR_TTS_ENGINE_CUSTOM_BINDINGS_JS);
688 source_map_.RegisterSource("types", IDR_TYPES_CUSTOM_BINDINGS_JS); 688 source_map_.RegisterSource("types", IDR_TYPES_CUSTOM_BINDINGS_JS);
689 source_map_.RegisterSource("webRequest", IDR_WEB_REQUEST_CUSTOM_BINDINGS_JS); 689 source_map_.RegisterSource("webRequest", IDR_WEB_REQUEST_CUSTOM_BINDINGS_JS);
690 source_map_.RegisterSource("webRequestInternal", 690 source_map_.RegisterSource("webRequestInternal",
691 IDR_WEB_REQUEST_INTERNAL_CUSTOM_BINDINGS_JS); 691 IDR_WEB_REQUEST_INTERNAL_CUSTOM_BINDINGS_JS);
692 source_map_.RegisterSource("webstore", IDR_WEBSTORE_CUSTOM_BINDINGS_JS); 692 source_map_.RegisterSource("webstore", IDR_WEBSTORE_CUSTOM_BINDINGS_JS);
693 693
694 // Platform app sources that are not API-specific.. 694 // Platform app sources that are not API-specific..
695 source_map_.RegisterSource("browserTag", IDR_BROWSER_TAG_JS); 695 const CommandLine& command_line = *(CommandLine::ForCurrentProcess());
696 if (command_line.HasSwitch(switches::kEnableBrowserPluginOldImplementation))
697 source_map_.RegisterSource("browserTag", IDR_BROWSER_TAG_OLD_JS);
698 else
699 source_map_.RegisterSource("browserTag", IDR_BROWSER_TAG_JS);
696 source_map_.RegisterSource("platformApp", IDR_PLATFORM_APP_JS); 700 source_map_.RegisterSource("platformApp", IDR_PLATFORM_APP_JS);
697 source_map_.RegisterSource("injectAppTitlebar", IDR_INJECT_APP_TITLEBAR_JS); 701 source_map_.RegisterSource("injectAppTitlebar", IDR_INJECT_APP_TITLEBAR_JS);
698 } 702 }
699 703
700 void Dispatcher::PopulateLazyBindingsMap() { 704 void Dispatcher::PopulateLazyBindingsMap() {
701 lazy_bindings_map_["app"] = InstallAppBindings; 705 lazy_bindings_map_["app"] = InstallAppBindings;
702 lazy_bindings_map_["webstore"] = InstallWebstoreBindings; 706 lazy_bindings_map_["webstore"] = InstallWebstoreBindings;
703 } 707 }
704 708
705 void Dispatcher::InstallBindings(ModuleSystem* module_system, 709 void Dispatcher::InstallBindings(ModuleSystem* module_system,
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 // we should abort. 1120 // we should abort.
1117 WebKit::WebFrame* frame = context->web_frame(); 1121 WebKit::WebFrame* frame = context->web_frame();
1118 ExtensionURLInfo url_info(frame->document().securityOrigin(), 1122 ExtensionURLInfo url_info(frame->document().securityOrigin(),
1119 UserScriptSlave::GetDataSourceURLForFrame(frame)); 1123 UserScriptSlave::GetDataSourceURLForFrame(frame));
1120 CHECK(!extensions_.IsSandboxedPage(url_info)); 1124 CHECK(!extensions_.IsSandboxedPage(url_info));
1121 1125
1122 return true; 1126 return true;
1123 } 1127 }
1124 1128
1125 } // namespace extensions 1129 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/resources/extensions/browser_tag.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698