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

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

Issue 11066043: Block NPAPI plug-ins in Metro mode instead of not loading them at all. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 2 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
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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 placeholder = PluginPlaceholder::CreateBlockedPlugin( 489 placeholder = PluginPlaceholder::CreateBlockedPlugin(
490 render_view, frame, params, plugin, identifier, group_name, 490 render_view, frame, params, plugin, identifier, group_name,
491 IDR_CLICK_TO_PLAY_PLUGIN_HTML, IDS_PLUGIN_LOAD); 491 IDR_CLICK_TO_PLAY_PLUGIN_HTML, IDS_PLUGIN_LOAD);
492 placeholder->set_blocked_for_prerendering(true); 492 placeholder->set_blocked_for_prerendering(true);
493 placeholder->set_allow_loading(true); 493 placeholder->set_allow_loading(true);
494 break; 494 break;
495 } 495 }
496 496
497 return render_view->CreatePlugin(frame, plugin, params); 497 return render_view->CreatePlugin(frame, plugin, params);
498 } 498 }
499 case ChromeViewHostMsg_GetPluginInfo_Status::kNpapiNotSupported: {
500 placeholder = PluginPlaceholder::CreateBlockedPlugin(
501 render_view, frame, params, plugin, identifier, group_name,
502 IDR_CLICK_TO_PLAY_PLUGIN_HTML, IDS_PLUGIN_NOT_SUPPORTED);
503 placeholder->set_allow_loading(true);
504 break;
505 }
499 case ChromeViewHostMsg_GetPluginInfo_Status::kDisabled: { 506 case ChromeViewHostMsg_GetPluginInfo_Status::kDisabled: {
500 placeholder = PluginPlaceholder::CreateBlockedPlugin( 507 placeholder = PluginPlaceholder::CreateBlockedPlugin(
501 render_view, frame, params, plugin, identifier, group_name, 508 render_view, frame, params, plugin, identifier, group_name,
502 IDR_DISABLED_PLUGIN_HTML, IDS_PLUGIN_DISABLED); 509 IDR_DISABLED_PLUGIN_HTML, IDS_PLUGIN_DISABLED);
503 break; 510 break;
504 } 511 }
505 case ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedBlocked: { 512 case ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedBlocked: {
506 #if defined(ENABLE_PLUGIN_INSTALLATION) 513 #if defined(ENABLE_PLUGIN_INSTALLATION)
507 placeholder = PluginPlaceholder::CreateBlockedPlugin( 514 placeholder = PluginPlaceholder::CreateBlockedPlugin(
508 render_view, frame, params, plugin, identifier, group_name, 515 render_view, frame, params, plugin, identifier, group_name,
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { 967 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() {
961 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); 968 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled();
962 } 969 }
963 970
964 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( 971 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories(
965 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { 972 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) {
966 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); 973 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory);
967 } 974 }
968 975
969 } // namespace chrome 976 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698