| OLD | NEW |
| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 ChromeViewHostMsg_GetPluginInfo_Status status; | 314 ChromeViewHostMsg_GetPluginInfo_Status status; |
| 315 webkit::WebPluginInfo plugin_info; | 315 webkit::WebPluginInfo plugin_info; |
| 316 std::string actual_mime_type; | 316 std::string actual_mime_type; |
| 317 std::string orig_mime_type = params.mimeType.utf8(); | 317 std::string orig_mime_type = params.mimeType.utf8(); |
| 318 | 318 |
| 319 if (orig_mime_type == content::kBrowserPluginMimeType && | 319 if (orig_mime_type == content::kBrowserPluginNewMimeType || |
| 320 extensions::ExtensionHelper::Get(render_view)->view_type() == | 320 ((orig_mime_type == content::kBrowserPluginMimeType) && |
| 321 VIEW_TYPE_APP_SHELL) | 321 extensions::ExtensionHelper::Get(render_view)->view_type() == |
| 322 VIEW_TYPE_APP_SHELL)) { |
| 322 return false; | 323 return false; |
| 324 } |
| 323 | 325 |
| 324 render_view->Send(new ChromeViewHostMsg_GetPluginInfo( | 326 render_view->Send(new ChromeViewHostMsg_GetPluginInfo( |
| 325 render_view->GetRoutingID(), GURL(params.url), | 327 render_view->GetRoutingID(), GURL(params.url), |
| 326 frame->top()->document().url(), orig_mime_type, | 328 frame->top()->document().url(), orig_mime_type, |
| 327 &status, &plugin_info, &actual_mime_type)); | 329 &status, &plugin_info, &actual_mime_type)); |
| 328 *plugin = CreatePlugin(render_view, frame, params, | 330 *plugin = CreatePlugin(render_view, frame, params, |
| 329 status, plugin_info, actual_mime_type); | 331 status, plugin_info, actual_mime_type); |
| 330 return true; | 332 return true; |
| 331 } | 333 } |
| 332 | 334 |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |