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

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

Issue 10868012: Browser Plugin: New Implementation (Browser Side) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master-trial-obrowser
Patch Set: integrate windows fix by Fady (original cl #10910228) Created 8 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 (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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 return l10n_util::GetStringUTF8(IDS_DEFAULT_ENCODING); 306 return l10n_util::GetStringUTF8(IDS_DEFAULT_ENCODING);
307 } 307 }
308 308
309 bool ChromeContentRendererClient::OverrideCreatePlugin( 309 bool ChromeContentRendererClient::OverrideCreatePlugin(
310 content::RenderView* render_view, 310 content::RenderView* render_view,
311 WebFrame* frame, 311 WebFrame* frame,
312 const WebPluginParams& params, 312 const WebPluginParams& params,
313 WebPlugin** plugin) { 313 WebPlugin** plugin) {
314 std::string orig_mime_type = params.mimeType.utf8(); 314 std::string orig_mime_type = params.mimeType.utf8();
315 315
316 if (orig_mime_type == content::kBrowserPluginMimeType && 316 if (orig_mime_type == content::kBrowserPluginNewMimeType ||
317 extensions::ExtensionHelper::Get(render_view)->view_type() == 317 ((orig_mime_type == content::kBrowserPluginMimeType) &&
318 VIEW_TYPE_APP_SHELL) 318 extensions::ExtensionHelper::Get(render_view)->view_type() ==
319 VIEW_TYPE_APP_SHELL)) {
319 return false; 320 return false;
321 }
320 322
321 ChromeViewHostMsg_GetPluginInfo_Output output; 323 ChromeViewHostMsg_GetPluginInfo_Output output;
322 render_view->Send(new ChromeViewHostMsg_GetPluginInfo( 324 render_view->Send(new ChromeViewHostMsg_GetPluginInfo(
323 render_view->GetRoutingID(), GURL(params.url), 325 render_view->GetRoutingID(), GURL(params.url),
324 frame->top()->document().url(), orig_mime_type, &output)); 326 frame->top()->document().url(), orig_mime_type, &output));
325 *plugin = CreatePlugin(render_view, frame, params, output); 327 *plugin = CreatePlugin(render_view, frame, params, output);
326 return true; 328 return true;
327 } 329 }
328 330
329 WebPlugin* ChromeContentRendererClient::CreatePluginReplacement( 331 WebPlugin* ChromeContentRendererClient::CreatePluginReplacement(
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { 960 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() {
959 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); 961 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled();
960 } 962 }
961 963
962 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( 964 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories(
963 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { 965 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) {
964 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); 966 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory);
965 } 967 }
966 968
967 } // namespace chrome 969 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698