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 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 CONTENT_SETTINGS_TYPE_PLUGINS; | 359 CONTENT_SETTINGS_TYPE_PLUGINS; |
360 | 360 |
361 if ((status_value == | 361 if ((status_value == |
362 ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized || | 362 ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized || |
363 status_value == ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay || | 363 status_value == ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay || |
364 status_value == ChromeViewHostMsg_GetPluginInfo_Status::kBlocked) && | 364 status_value == ChromeViewHostMsg_GetPluginInfo_Status::kBlocked) && |
365 observer->plugins_temporarily_allowed()) { | 365 observer->plugins_temporarily_allowed()) { |
366 status_value = ChromeViewHostMsg_GetPluginInfo_Status::kAllowed; | 366 status_value = ChromeViewHostMsg_GetPluginInfo_Status::kAllowed; |
367 } | 367 } |
368 | 368 |
| 369 // Allow full-page plug-ins for click-to-play. |
| 370 if (status_value == ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay && |
| 371 !frame->parent() && |
| 372 !frame->opener() && |
| 373 frame->document().isPluginDocument()) { |
| 374 status_value = ChromeViewHostMsg_GetPluginInfo_Status::kAllowed; |
| 375 } |
| 376 |
369 switch (status_value) { | 377 switch (status_value) { |
370 case ChromeViewHostMsg_GetPluginInfo_Status::kNotFound: { | 378 case ChromeViewHostMsg_GetPluginInfo_Status::kNotFound: { |
371 NOTREACHED(); | 379 NOTREACHED(); |
372 break; | 380 break; |
373 } | 381 } |
374 case ChromeViewHostMsg_GetPluginInfo_Status::kAllowed: { | 382 case ChromeViewHostMsg_GetPluginInfo_Status::kAllowed: { |
375 const char* kNaClMimeType = "application/x-nacl"; | 383 const char* kNaClMimeType = "application/x-nacl"; |
376 bool is_nacl_mime_type = actual_mime_type == kNaClMimeType; | 384 bool is_nacl_mime_type = actual_mime_type == kNaClMimeType; |
377 bool is_nacl_unrestricted; | 385 bool is_nacl_unrestricted; |
378 if (is_nacl_plugin) { | 386 if (is_nacl_plugin) { |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { | 867 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { |
860 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); | 868 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); |
861 } | 869 } |
862 | 870 |
863 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( | 871 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( |
864 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { | 872 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { |
865 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); | 873 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); |
866 } | 874 } |
867 | 875 |
868 } // namespace chrome | 876 } // namespace chrome |
OLD | NEW |