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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 render_view, frame, params, plugin, identifier, group_name, | 511 render_view, frame, params, plugin, identifier, group_name, |
512 IDR_CLICK_TO_PLAY_PLUGIN_HTML, | 512 IDR_CLICK_TO_PLAY_PLUGIN_HTML, |
513 l10n_util::GetStringFUTF16(IDS_PLUGIN_LOAD, group_name)); | 513 l10n_util::GetStringFUTF16(IDS_PLUGIN_LOAD, group_name)); |
514 placeholder->set_blocked_for_prerendering(true); | 514 placeholder->set_blocked_for_prerendering(true); |
515 placeholder->set_allow_loading(true); | 515 placeholder->set_allow_loading(true); |
516 break; | 516 break; |
517 } | 517 } |
518 | 518 |
519 return render_view->CreatePlugin(frame, plugin, params); | 519 return render_view->CreatePlugin(frame, plugin, params); |
520 } | 520 } |
| 521 case ChromeViewHostMsg_GetPluginInfo_Status::kNPAPINotSupported: { |
| 522 RenderThread::Get()->RecordUserMetrics("Plugin_NPAPINotSupported"); |
| 523 placeholder = PluginPlaceholder::CreateBlockedPlugin( |
| 524 render_view, frame, params, plugin, identifier, group_name, |
| 525 IDR_BLOCKED_PLUGIN_HTML, |
| 526 l10n_util::GetStringUTF16(IDS_PLUGIN_NOT_SUPPORTED)); |
| 527 render_view->Send(new ChromeViewHostMsg_NPAPINotSupported( |
| 528 render_view->GetRoutingID(), identifier)); |
| 529 break; |
| 530 } |
521 case ChromeViewHostMsg_GetPluginInfo_Status::kDisabled: { | 531 case ChromeViewHostMsg_GetPluginInfo_Status::kDisabled: { |
522 placeholder = PluginPlaceholder::CreateBlockedPlugin( | 532 placeholder = PluginPlaceholder::CreateBlockedPlugin( |
523 render_view, frame, params, plugin, identifier, group_name, | 533 render_view, frame, params, plugin, identifier, group_name, |
524 IDR_DISABLED_PLUGIN_HTML, | 534 IDR_DISABLED_PLUGIN_HTML, |
525 l10n_util::GetStringFUTF16(IDS_PLUGIN_DISABLED, group_name)); | 535 l10n_util::GetStringFUTF16(IDS_PLUGIN_DISABLED, group_name)); |
526 break; | 536 break; |
527 } | 537 } |
528 case ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedBlocked: { | 538 case ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedBlocked: { |
529 #if defined(ENABLE_PLUGIN_INSTALLATION) | 539 #if defined(ENABLE_PLUGIN_INSTALLATION) |
530 placeholder = PluginPlaceholder::CreateBlockedPlugin( | 540 placeholder = PluginPlaceholder::CreateBlockedPlugin( |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
976 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { | 986 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { |
977 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); | 987 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); |
978 } | 988 } |
979 | 989 |
980 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( | 990 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( |
981 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { | 991 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { |
982 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); | 992 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); |
983 } | 993 } |
984 | 994 |
985 } // namespace chrome | 995 } // namespace chrome |
OLD | NEW |