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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 extensions::ExtensionHelper::Get(render_view)->view_type() == |
312 extensions::ExtensionHelper::Get(render_view)->view_type() == | 312 VIEW_TYPE_APP_SHELL) { |
313 VIEW_TYPE_APP_SHELL)) { | 313 return false; |
314 return false; | |
315 } | 314 } |
316 | 315 |
317 ChromeViewHostMsg_GetPluginInfo_Output output; | 316 ChromeViewHostMsg_GetPluginInfo_Output output; |
318 render_view->Send(new ChromeViewHostMsg_GetPluginInfo( | 317 render_view->Send(new ChromeViewHostMsg_GetPluginInfo( |
319 render_view->GetRoutingID(), GURL(params.url), | 318 render_view->GetRoutingID(), GURL(params.url), |
320 frame->top()->document().url(), orig_mime_type, &output)); | 319 frame->top()->document().url(), orig_mime_type, &output)); |
321 *plugin = CreatePlugin(render_view, frame, params, output); | 320 *plugin = CreatePlugin(render_view, frame, params, output); |
322 return true; | 321 return true; |
323 } | 322 } |
324 | 323 |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { | 957 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { |
959 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); | 958 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); |
960 } | 959 } |
961 | 960 |
962 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( | 961 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( |
963 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { | 962 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { |
964 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); | 963 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); |
965 } | 964 } |
966 | 965 |
967 } // namespace chrome | 966 } // namespace chrome |
OLD | NEW |