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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/crash_logging.h" | 8 #include "base/debug/crash_logging.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 plugin, | 788 plugin, |
789 identifier, | 789 identifier, |
790 group_name, | 790 group_name, |
791 IDR_BLOCKED_PLUGIN_HTML, | 791 IDR_BLOCKED_PLUGIN_HTML, |
792 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); | 792 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); |
793 placeholder->set_allow_loading(true); | 793 placeholder->set_allow_loading(true); |
794 RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); | 794 RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); |
795 observer->DidBlockContentType(content_type); | 795 observer->DidBlockContentType(content_type); |
796 break; | 796 break; |
797 } | 797 } |
| 798 case ChromeViewHostMsg_GetPluginInfo_Status::kBlockedByPolicy: { |
| 799 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin( |
| 800 render_frame, |
| 801 frame, |
| 802 params, |
| 803 plugin, |
| 804 identifier, |
| 805 group_name, |
| 806 IDR_BLOCKED_PLUGIN_HTML, |
| 807 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); |
| 808 placeholder->set_allow_loading(false); |
| 809 RenderThread::Get()->RecordAction( |
| 810 UserMetricsAction("Plugin_BlockedByPolicy")); |
| 811 observer->DidBlockContentType(content_type); |
| 812 break; |
| 813 } |
798 } | 814 } |
799 } | 815 } |
800 placeholder->SetStatus(status); | 816 placeholder->SetStatus(status); |
801 return placeholder->plugin(); | 817 return placeholder->plugin(); |
802 } | 818 } |
803 | 819 |
804 // For NaCl content handling plugins, the NaCl manifest is stored in an | 820 // For NaCl content handling plugins, the NaCl manifest is stored in an |
805 // additonal 'nacl' param associated with the MIME type. | 821 // additonal 'nacl' param associated with the MIME type. |
806 // static | 822 // static |
807 GURL ChromeContentRendererClient::GetNaClContentHandlerURL( | 823 GURL ChromeContentRendererClient::GetNaClContentHandlerURL( |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1384 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 1400 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
1385 return !command_line->HasSwitch(switches::kExtensionProcess); | 1401 return !command_line->HasSwitch(switches::kExtensionProcess); |
1386 } | 1402 } |
1387 | 1403 |
1388 blink::WebWorkerPermissionClientProxy* | 1404 blink::WebWorkerPermissionClientProxy* |
1389 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( | 1405 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( |
1390 content::RenderFrame* render_frame, | 1406 content::RenderFrame* render_frame, |
1391 blink::WebFrame* frame) { | 1407 blink::WebFrame* frame) { |
1392 return new WorkerPermissionClientProxy(render_frame, frame); | 1408 return new WorkerPermissionClientProxy(render_frame, frame); |
1393 } | 1409 } |
OLD | NEW |