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::kBrowserPluginNewMimeType || | 319 if (orig_mime_type == content::kBrowserPluginMimeType && |
320 ((orig_mime_type == content::kBrowserPluginMimeType) && | 320 extensions::ExtensionHelper::Get(render_view)->view_type() == |
321 extensions::ExtensionHelper::Get(render_view)->view_type() == | 321 VIEW_TYPE_APP_SHELL) |
322 VIEW_TYPE_APP_SHELL)) { | |
323 return false; | 322 return false; |
324 } | |
325 | 323 |
326 render_view->Send(new ChromeViewHostMsg_GetPluginInfo( | 324 render_view->Send(new ChromeViewHostMsg_GetPluginInfo( |
327 render_view->GetRoutingID(), GURL(params.url), | 325 render_view->GetRoutingID(), GURL(params.url), |
328 frame->top()->document().url(), orig_mime_type, | 326 frame->top()->document().url(), orig_mime_type, |
329 &status, &plugin_info, &actual_mime_type)); | 327 &status, &plugin_info, &actual_mime_type)); |
330 *plugin = CreatePlugin(render_view, frame, params, | 328 *plugin = CreatePlugin(render_view, frame, params, |
331 status, plugin_info, actual_mime_type); | 329 status, plugin_info, actual_mime_type); |
332 return true; | 330 return true; |
333 } | 331 } |
334 | 332 |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { | 963 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { |
966 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); | 964 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); |
967 } | 965 } |
968 | 966 |
969 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( | 967 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( |
970 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { | 968 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { |
971 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); | 969 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); |
972 } | 970 } |
973 | 971 |
974 } // namespace chrome | 972 } // namespace chrome |
OLD | NEW |