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

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

Issue 11742017: Allow Plugin placeholders to be shown when plugins are disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 return false; 353 return false;
354 WebDocument document = frame->document(); 354 WebDocument document = frame->document();
355 const extensions::Extension* extension = 355 const extensions::Extension* extension =
356 GetExtension(document.securityOrigin()); 356 GetExtension(document.securityOrigin());
357 if (extension && extension->HasAPIPermission( 357 if (extension && extension->HasAPIPermission(
358 extensions::APIPermission::kWebView)) 358 extensions::APIPermission::kWebView))
359 return false; 359 return false;
360 } 360 }
361 361
362 ChromeViewHostMsg_GetPluginInfo_Output output; 362 ChromeViewHostMsg_GetPluginInfo_Output output;
363 #if defined(ENABLE_PLUGINS)
363 render_view->Send(new ChromeViewHostMsg_GetPluginInfo( 364 render_view->Send(new ChromeViewHostMsg_GetPluginInfo(
364 render_view->GetRoutingID(), GURL(params.url), 365 render_view->GetRoutingID(), GURL(params.url),
365 frame->top()->document().url(), orig_mime_type, &output)); 366 frame->top()->document().url(), orig_mime_type, &output));
367 #else
368 output.status.value = ChromeViewHostMsg_GetPluginInfo_Status::kNotFound;
Bernhard Bauer 2013/01/03 06:51:37 Not: I think it would probably not be unreasonable
nilesh 2013/01/03 19:37:59 It looks like there is code which relies on the de
369 #endif
366 *plugin = CreatePlugin(render_view, frame, params, output); 370 *plugin = CreatePlugin(render_view, frame, params, output);
367 return true; 371 return true;
368 } 372 }
369 373
370 WebPlugin* ChromeContentRendererClient::CreatePluginReplacement( 374 WebPlugin* ChromeContentRendererClient::CreatePluginReplacement(
371 content::RenderView* render_view, 375 content::RenderView* render_view,
372 const FilePath& plugin_path) { 376 const FilePath& plugin_path) {
373 PluginPlaceholder* placeholder = 377 PluginPlaceholder* placeholder =
374 PluginPlaceholder::CreateErrorPlugin(render_view, plugin_path); 378 PluginPlaceholder::CreateErrorPlugin(render_view, plugin_path);
375 return placeholder->plugin(); 379 return placeholder->plugin();
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 } 1023 }
1020 1024
1021 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( 1025 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories(
1022 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { 1026 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) {
1023 #if defined(ENABLE_PLUGINS) 1027 #if defined(ENABLE_PLUGINS)
1024 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); 1028 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory);
1025 #endif 1029 #endif
1026 } 1030 }
1027 1031
1028 } // namespace chrome 1032 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698