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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 11052019: <browser> Make new implementation the default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browsertests for browser plugin. 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/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 std::string ChromeContentRendererClient::GetDefaultEncoding() { 300 std::string ChromeContentRendererClient::GetDefaultEncoding() {
301 return l10n_util::GetStringUTF8(IDS_DEFAULT_ENCODING); 301 return l10n_util::GetStringUTF8(IDS_DEFAULT_ENCODING);
302 } 302 }
303 303
304 bool ChromeContentRendererClient::OverrideCreatePlugin( 304 bool ChromeContentRendererClient::OverrideCreatePlugin(
305 content::RenderView* render_view, 305 content::RenderView* render_view,
306 WebFrame* frame, 306 WebFrame* frame,
307 const WebPluginParams& params, 307 const WebPluginParams& params,
308 WebPlugin** plugin) { 308 WebPlugin** plugin) {
309 std::string orig_mime_type = params.mimeType.utf8(); 309 std::string orig_mime_type = params.mimeType.utf8();
310 if (orig_mime_type == content::kBrowserPluginNewMimeType || 310 if (orig_mime_type == content::kBrowserPluginMimeType) {
311 ((orig_mime_type == content::kBrowserPluginMimeType) && 311 bool browser_plugin_old_impl = CommandLine::ForCurrentProcess()->HasSwitch(
312 switches::kEnableBrowserPluginOldImplementation);
313 if (!browser_plugin_old_impl) {
314 // TODO(lazyboy): Restrict new path to apps as well?
Mihai Parparita -not on Chrome 2012/10/03 22:44:00 Please do.
lazyboy 2012/10/03 23:26:57 Done. Also the other TODO below should be covered
315 return false;
316 } else if (browser_plugin_old_impl &&
312 extensions::ExtensionHelper::Get(render_view)->view_type() == 317 extensions::ExtensionHelper::Get(render_view)->view_type() ==
313 VIEW_TYPE_APP_SHELL)) { 318 VIEW_TYPE_APP_SHELL) {
319 // TODO(fsamuel): Remove this once upstreaming of the new browser plugin
320 // is complete.
314 return false; 321 return false;
322 }
315 } 323 }
316 324
317 ChromeViewHostMsg_GetPluginInfo_Output output; 325 ChromeViewHostMsg_GetPluginInfo_Output output;
318 render_view->Send(new ChromeViewHostMsg_GetPluginInfo( 326 render_view->Send(new ChromeViewHostMsg_GetPluginInfo(
319 render_view->GetRoutingID(), GURL(params.url), 327 render_view->GetRoutingID(), GURL(params.url),
320 frame->top()->document().url(), orig_mime_type, &output)); 328 frame->top()->document().url(), orig_mime_type, &output));
321 *plugin = CreatePlugin(render_view, frame, params, output); 329 *plugin = CreatePlugin(render_view, frame, params, output);
322 return true; 330 return true;
323 } 331 }
324 332
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { 966 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() {
959 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); 967 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled();
960 } 968 }
961 969
962 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( 970 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories(
963 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { 971 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) {
964 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); 972 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory);
965 } 973 }
966 974
967 } // namespace chrome 975 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698