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; |
323 | 324 |
324 render_view->Send(new ChromeViewHostMsg_GetPluginInfo( | 325 render_view->Send(new ChromeViewHostMsg_GetPluginInfo( |
325 render_view->GetRoutingID(), GURL(params.url), | 326 render_view->GetRoutingID(), GURL(params.url), |
326 frame->top()->document().url(), orig_mime_type, | 327 frame->top()->document().url(), orig_mime_type, |
327 &status, &plugin_info, &actual_mime_type)); | 328 &status, &plugin_info, &actual_mime_type)); |
328 *plugin = CreatePlugin(render_view, frame, params, | 329 *plugin = CreatePlugin(render_view, frame, params, |
329 status, plugin_info, actual_mime_type); | 330 status, plugin_info, actual_mime_type); |
330 return true; | 331 return true; |
331 } | 332 } |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { | 953 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { |
953 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); | 954 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); |
954 } | 955 } |
955 | 956 |
956 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( | 957 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( |
957 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { | 958 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { |
958 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); | 959 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); |
959 } | 960 } |
960 | 961 |
961 } // namespace chrome | 962 } // namespace chrome |
OLD | NEW |