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

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

Issue 23606022: Move renderer plugin code into a new component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move renderer plugin code into a new component - put back wrongly deleted DEPS file Created 7 years, 3 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
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "chrome/renderer/loadtimes_extension_bindings.h" 42 #include "chrome/renderer/loadtimes_extension_bindings.h"
43 #include "chrome/renderer/net/net_error_helper.h" 43 #include "chrome/renderer/net/net_error_helper.h"
44 #include "chrome/renderer/net/prescient_networking_dispatcher.h" 44 #include "chrome/renderer/net/prescient_networking_dispatcher.h"
45 #include "chrome/renderer/net/renderer_net_predictor.h" 45 #include "chrome/renderer/net/renderer_net_predictor.h"
46 #include "chrome/renderer/net_benchmarking_extension.h" 46 #include "chrome/renderer/net_benchmarking_extension.h"
47 #include "chrome/renderer/page_load_histograms.h" 47 #include "chrome/renderer/page_load_histograms.h"
48 #include "chrome/renderer/pepper/pepper_helper.h" 48 #include "chrome/renderer/pepper/pepper_helper.h"
49 #include "chrome/renderer/pepper/ppb_nacl_private_impl.h" 49 #include "chrome/renderer/pepper/ppb_nacl_private_impl.h"
50 #include "chrome/renderer/pepper/ppb_pdf_impl.h" 50 #include "chrome/renderer/pepper/ppb_pdf_impl.h"
51 #include "chrome/renderer/playback_extension.h" 51 #include "chrome/renderer/playback_extension.h"
52 #include "chrome/renderer/plugins/plugin_placeholder.h" 52 #include "chrome/renderer/plugins/chrome_plugin_placeholder.h"
53 #include "chrome/renderer/plugins/plugin_uma.h"
54 #include "chrome/renderer/prerender/prerender_dispatcher.h" 53 #include "chrome/renderer/prerender/prerender_dispatcher.h"
55 #include "chrome/renderer/prerender/prerender_helper.h" 54 #include "chrome/renderer/prerender/prerender_helper.h"
56 #include "chrome/renderer/prerender/prerender_media_load_deferrer.h" 55 #include "chrome/renderer/prerender/prerender_media_load_deferrer.h"
57 #include "chrome/renderer/prerender/prerenderer_client.h" 56 #include "chrome/renderer/prerender/prerenderer_client.h"
58 #include "chrome/renderer/printing/print_web_view_helper.h" 57 #include "chrome/renderer/printing/print_web_view_helper.h"
59 #include "chrome/renderer/safe_browsing/malware_dom_details.h" 58 #include "chrome/renderer/safe_browsing/malware_dom_details.h"
60 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" 59 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h"
61 #include "chrome/renderer/searchbox/searchbox.h" 60 #include "chrome/renderer/searchbox/searchbox.h"
62 #include "chrome/renderer/searchbox/searchbox_extension.h" 61 #include "chrome/renderer/searchbox/searchbox_extension.h"
63 #include "chrome/renderer/tts_dispatcher.h" 62 #include "chrome/renderer/tts_dispatcher.h"
64 #include "chrome/renderer/validation_message_agent.h" 63 #include "chrome/renderer/validation_message_agent.h"
65 #include "components/autofill/content/renderer/autofill_agent.h" 64 #include "components/autofill/content/renderer/autofill_agent.h"
66 #include "components/autofill/content/renderer/password_autofill_agent.h" 65 #include "components/autofill/content/renderer/password_autofill_agent.h"
67 #include "components/autofill/content/renderer/password_generation_manager.h" 66 #include "components/autofill/content/renderer/password_generation_manager.h"
67 #include "components/plugins/renderer/plugin_uma.h"
68 #include "components/visitedlink/renderer/visitedlink_slave.h" 68 #include "components/visitedlink/renderer/visitedlink_slave.h"
69 #include "content/public/common/content_constants.h" 69 #include "content/public/common/content_constants.h"
70 #include "content/public/renderer/render_thread.h" 70 #include "content/public/renderer/render_thread.h"
71 #include "content/public/renderer/render_view.h" 71 #include "content/public/renderer/render_view.h"
72 #include "content/public/renderer/render_view_visitor.h" 72 #include "content/public/renderer/render_view_visitor.h"
73 #include "extensions/common/constants.h" 73 #include "extensions/common/constants.h"
74 #include "extensions/common/extension_urls.h" 74 #include "extensions/common/extension_urls.h"
75 #include "grit/generated_resources.h" 75 #include "grit/generated_resources.h"
76 #include "grit/locale_settings.h" 76 #include "grit/locale_settings.h"
77 #include "grit/renderer_resources.h" 77 #include "grit/renderer_resources.h"
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 #else 454 #else
455 output.status.value = ChromeViewHostMsg_GetPluginInfo_Status::kNotFound; 455 output.status.value = ChromeViewHostMsg_GetPluginInfo_Status::kNotFound;
456 #endif 456 #endif
457 *plugin = CreatePlugin(render_view, frame, params, output); 457 *plugin = CreatePlugin(render_view, frame, params, output);
458 return true; 458 return true;
459 } 459 }
460 460
461 WebPlugin* ChromeContentRendererClient::CreatePluginReplacement( 461 WebPlugin* ChromeContentRendererClient::CreatePluginReplacement(
462 content::RenderView* render_view, 462 content::RenderView* render_view,
463 const base::FilePath& plugin_path) { 463 const base::FilePath& plugin_path) {
464 PluginPlaceholder* placeholder = 464 ChromePluginPlaceholder* placeholder =
465 PluginPlaceholder::CreateErrorPlugin(render_view, plugin_path); 465 ChromePluginPlaceholder::CreateErrorPlugin(render_view, plugin_path);
466 return placeholder->plugin(); 466 return placeholder->plugin();
467 } 467 }
468 468
469 void ChromeContentRendererClient::DeferMediaLoad( 469 void ChromeContentRendererClient::DeferMediaLoad(
470 content::RenderView* render_view, 470 content::RenderView* render_view,
471 const base::Closure& closure) { 471 const base::Closure& closure) {
472 #if defined(OS_ANDROID) 472 #if defined(OS_ANDROID)
473 // Chromium for Android doesn't support prerender yet. 473 // Chromium for Android doesn't support prerender yet.
474 closure.Run(); 474 closure.Run();
475 return; 475 return;
(...skipping 14 matching lines...) Expand all
490 const WebPluginParams& original_params, 490 const WebPluginParams& original_params,
491 const ChromeViewHostMsg_GetPluginInfo_Output& output) { 491 const ChromeViewHostMsg_GetPluginInfo_Output& output) {
492 const ChromeViewHostMsg_GetPluginInfo_Status& status = output.status; 492 const ChromeViewHostMsg_GetPluginInfo_Status& status = output.status;
493 const WebPluginInfo& plugin = output.plugin; 493 const WebPluginInfo& plugin = output.plugin;
494 const std::string& actual_mime_type = output.actual_mime_type; 494 const std::string& actual_mime_type = output.actual_mime_type;
495 const string16& group_name = output.group_name; 495 const string16& group_name = output.group_name;
496 const std::string& identifier = output.group_identifier; 496 const std::string& identifier = output.group_identifier;
497 ChromeViewHostMsg_GetPluginInfo_Status::Value status_value = status.value; 497 ChromeViewHostMsg_GetPluginInfo_Status::Value status_value = status.value;
498 GURL url(original_params.url); 498 GURL url(original_params.url);
499 std::string orig_mime_type = original_params.mimeType.utf8(); 499 std::string orig_mime_type = original_params.mimeType.utf8();
500 PluginPlaceholder* placeholder = NULL; 500 ChromePluginPlaceholder* placeholder = NULL;
501 501
502 // If the browser plugin is to be enabled, this should be handled by the 502 // If the browser plugin is to be enabled, this should be handled by the
503 // renderer, so the code won't reach here due to the early exit in 503 // renderer, so the code won't reach here due to the early exit in
504 // OverrideCreatePlugin. 504 // OverrideCreatePlugin.
505 if (status_value == ChromeViewHostMsg_GetPluginInfo_Status::kNotFound || 505 if (status_value == ChromeViewHostMsg_GetPluginInfo_Status::kNotFound ||
506 orig_mime_type == content::kBrowserPluginMimeType) { 506 orig_mime_type == content::kBrowserPluginMimeType) {
507 #if defined(ENABLE_MOBILE_YOUTUBE_PLUGIN) 507 #if defined(ENABLE_MOBILE_YOUTUBE_PLUGIN)
508 if (PluginPlaceholder::IsYouTubeURL(url, orig_mime_type)) 508 if (ChromePluginPlaceholder::IsYouTubeURL(url, orig_mime_type))
509 return PluginPlaceholder::CreateMobileYoutubePlugin(render_view, frame, 509 return ChromePluginPlaceholder::CreateMobileYoutubePlugin(
510 original_params)->plugin(); 510 render_view, frame, original_params)->plugin();
511 #endif 511 #endif
512 PluginUMAReporter::GetInstance()->ReportPluginMissing(orig_mime_type, url); 512 PluginUMAReporter::GetInstance()->ReportPluginMissing(orig_mime_type, url);
513 placeholder = PluginPlaceholder::CreateMissingPlugin( 513 placeholder = ChromePluginPlaceholder::CreateMissingPlugin(
514 render_view, frame, original_params); 514 render_view, frame, original_params);
515 } else { 515 } else {
516 // TODO(bauerb): This should be in content/. 516 // TODO(bauerb): This should be in content/.
517 WebPluginParams params(original_params); 517 WebPluginParams params(original_params);
518 for (size_t i = 0; i < plugin.mime_types.size(); ++i) { 518 for (size_t i = 0; i < plugin.mime_types.size(); ++i) {
519 if (plugin.mime_types[i].mime_type == actual_mime_type) { 519 if (plugin.mime_types[i].mime_type == actual_mime_type) {
520 AppendParams(plugin.mime_types[i].additional_param_names, 520 AppendParams(plugin.mime_types[i].additional_param_names,
521 plugin.mime_types[i].additional_param_values, 521 plugin.mime_types[i].additional_param_values,
522 &params.attributeNames, 522 &params.attributeNames,
523 &params.attributeValues); 523 &params.attributeValues);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 case ChromeViewHostMsg_GetPluginInfo_Status::kAllowed: { 575 case ChromeViewHostMsg_GetPluginInfo_Status::kAllowed: {
576 const char* kPnaclMimeType = "application/x-pnacl"; 576 const char* kPnaclMimeType = "application/x-pnacl";
577 if (actual_mime_type == kPnaclMimeType) { 577 if (actual_mime_type == kPnaclMimeType) {
578 if (CommandLine::ForCurrentProcess()->HasSwitch( 578 if (CommandLine::ForCurrentProcess()->HasSwitch(
579 switches::kDisablePnacl)) { 579 switches::kDisablePnacl)) {
580 frame->addMessageToConsole( 580 frame->addMessageToConsole(
581 WebConsoleMessage( 581 WebConsoleMessage(
582 WebConsoleMessage::LevelError, 582 WebConsoleMessage::LevelError,
583 "Portable Native Client must not be disabled in" 583 "Portable Native Client must not be disabled in"
584 " about:flags.")); 584 " about:flags."));
585 placeholder = PluginPlaceholder::CreateBlockedPlugin( 585 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin(
586 render_view, frame, params, plugin, identifier, group_name, 586 render_view,
587 frame,
588 params,
589 plugin,
590 identifier,
591 group_name,
587 IDR_BLOCKED_PLUGIN_HTML, 592 IDR_BLOCKED_PLUGIN_HTML,
588 #if defined(OS_CHROMEOS) 593 #if defined(OS_CHROMEOS)
589 l10n_util::GetStringUTF16(IDS_NACL_PLUGIN_BLOCKED)); 594 l10n_util::GetStringUTF16(IDS_NACL_PLUGIN_BLOCKED));
590 #else 595 #else
591 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); 596 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
592 #endif 597 #endif
593 break; 598 break;
594 } 599 }
595 } else { 600 } else {
596 const char* kNaClMimeType = "application/x-nacl"; 601 const char* kNaClMimeType = "application/x-nacl";
(...skipping 30 matching lines...) Expand all
627 app_url, 632 app_url,
628 is_nacl_unrestricted, 633 is_nacl_unrestricted,
629 extension, 634 extension,
630 &params)) { 635 &params)) {
631 frame->addMessageToConsole( 636 frame->addMessageToConsole(
632 WebConsoleMessage( 637 WebConsoleMessage(
633 WebConsoleMessage::LevelError, 638 WebConsoleMessage::LevelError,
634 "Only unpacked extensions and apps installed from the " 639 "Only unpacked extensions and apps installed from the "
635 "Chrome Web Store can load NaCl modules without enabling " 640 "Chrome Web Store can load NaCl modules without enabling "
636 "Native Client in about:flags.")); 641 "Native Client in about:flags."));
637 placeholder = PluginPlaceholder::CreateBlockedPlugin( 642 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin(
638 render_view, frame, params, plugin, identifier, group_name, 643 render_view,
644 frame,
645 params,
646 plugin,
647 identifier,
648 group_name,
639 IDR_BLOCKED_PLUGIN_HTML, 649 IDR_BLOCKED_PLUGIN_HTML,
640 #if defined(OS_CHROMEOS) 650 #if defined(OS_CHROMEOS)
641 l10n_util::GetStringUTF16(IDS_NACL_PLUGIN_BLOCKED)); 651 l10n_util::GetStringUTF16(IDS_NACL_PLUGIN_BLOCKED));
642 #else 652 #else
643 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); 653 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
644 #endif 654 #endif
645 break; 655 break;
646 } 656 }
647 } 657 }
648 } 658 }
649 659
650 // Delay loading plugins if prerendering. 660 // Delay loading plugins if prerendering.
651 // TODO(mmenke): In the case of prerendering, feed into 661 // TODO(mmenke): In the case of prerendering, feed into
652 // ChromeContentRendererClient::CreatePlugin instead, to 662 // ChromeContentRendererClient::CreatePlugin instead, to
653 // reduce the chance of future regressions. 663 // reduce the chance of future regressions.
654 if (prerender::PrerenderHelper::IsPrerendering(render_view)) { 664 if (prerender::PrerenderHelper::IsPrerendering(render_view)) {
655 placeholder = PluginPlaceholder::CreateBlockedPlugin( 665 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin(
656 render_view, frame, params, plugin, identifier, group_name, 666 render_view,
667 frame,
668 params,
669 plugin,
670 identifier,
671 group_name,
657 IDR_CLICK_TO_PLAY_PLUGIN_HTML, 672 IDR_CLICK_TO_PLAY_PLUGIN_HTML,
658 l10n_util::GetStringFUTF16(IDS_PLUGIN_LOAD, group_name)); 673 l10n_util::GetStringFUTF16(IDS_PLUGIN_LOAD, group_name));
659 placeholder->set_blocked_for_prerendering(true); 674 placeholder->set_blocked_for_prerendering(true);
660 placeholder->set_allow_loading(true); 675 placeholder->set_allow_loading(true);
661 break; 676 break;
662 } 677 }
663 678
664 return render_view->CreatePlugin(frame, plugin, params); 679 return render_view->CreatePlugin(frame, plugin, params);
665 } 680 }
666 case ChromeViewHostMsg_GetPluginInfo_Status::kNPAPINotSupported: { 681 case ChromeViewHostMsg_GetPluginInfo_Status::kNPAPINotSupported: {
667 RenderThread::Get()->RecordUserMetrics("Plugin_NPAPINotSupported"); 682 RenderThread::Get()->RecordUserMetrics("Plugin_NPAPINotSupported");
668 placeholder = PluginPlaceholder::CreateBlockedPlugin( 683 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin(
669 render_view, frame, params, plugin, identifier, group_name, 684 render_view,
685 frame,
686 params,
687 plugin,
688 identifier,
689 group_name,
670 IDR_BLOCKED_PLUGIN_HTML, 690 IDR_BLOCKED_PLUGIN_HTML,
671 l10n_util::GetStringUTF16(IDS_PLUGIN_NOT_SUPPORTED_METRO)); 691 l10n_util::GetStringUTF16(IDS_PLUGIN_NOT_SUPPORTED_METRO));
672 render_view->Send(new ChromeViewHostMsg_NPAPINotSupported( 692 render_view->Send(new ChromeViewHostMsg_NPAPINotSupported(
673 render_view->GetRoutingID(), identifier)); 693 render_view->GetRoutingID(), identifier));
674 break; 694 break;
675 } 695 }
676 case ChromeViewHostMsg_GetPluginInfo_Status::kDisabled: { 696 case ChromeViewHostMsg_GetPluginInfo_Status::kDisabled: {
677 PluginUMAReporter::GetInstance()->ReportPluginDisabled(orig_mime_type, 697 PluginUMAReporter::GetInstance()->ReportPluginDisabled(orig_mime_type,
678 url); 698 url);
679 placeholder = PluginPlaceholder::CreateBlockedPlugin( 699 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin(
680 render_view, frame, params, plugin, identifier, group_name, 700 render_view,
701 frame,
702 params,
703 plugin,
704 identifier,
705 group_name,
681 IDR_DISABLED_PLUGIN_HTML, 706 IDR_DISABLED_PLUGIN_HTML,
682 l10n_util::GetStringFUTF16(IDS_PLUGIN_DISABLED, group_name)); 707 l10n_util::GetStringFUTF16(IDS_PLUGIN_DISABLED, group_name));
683 break; 708 break;
684 } 709 }
685 case ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedBlocked: { 710 case ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedBlocked: {
686 #if defined(ENABLE_PLUGIN_INSTALLATION) 711 #if defined(ENABLE_PLUGIN_INSTALLATION)
687 placeholder = PluginPlaceholder::CreateBlockedPlugin( 712 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin(
688 render_view, frame, params, plugin, identifier, group_name, 713 render_view,
714 frame,
715 params,
716 plugin,
717 identifier,
718 group_name,
689 IDR_BLOCKED_PLUGIN_HTML, 719 IDR_BLOCKED_PLUGIN_HTML,
690 l10n_util::GetStringFUTF16(IDS_PLUGIN_OUTDATED, group_name)); 720 l10n_util::GetStringFUTF16(IDS_PLUGIN_OUTDATED, group_name));
691 placeholder->set_allow_loading(true); 721 placeholder->set_allow_loading(true);
692 render_view->Send(new ChromeViewHostMsg_BlockedOutdatedPlugin( 722 render_view->Send(new ChromeViewHostMsg_BlockedOutdatedPlugin(
693 render_view->GetRoutingID(), placeholder->CreateRoutingId(), 723 render_view->GetRoutingID(), placeholder->CreateRoutingId(),
694 identifier)); 724 identifier));
695 #else 725 #else
696 NOTREACHED(); 726 NOTREACHED();
697 #endif 727 #endif
698 break; 728 break;
699 } 729 }
700 case ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedDisallowed: { 730 case ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedDisallowed: {
701 placeholder = PluginPlaceholder::CreateBlockedPlugin( 731 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin(
702 render_view, frame, params, plugin, identifier, group_name, 732 render_view,
733 frame,
734 params,
735 plugin,
736 identifier,
737 group_name,
703 IDR_BLOCKED_PLUGIN_HTML, 738 IDR_BLOCKED_PLUGIN_HTML,
704 l10n_util::GetStringFUTF16(IDS_PLUGIN_OUTDATED, group_name)); 739 l10n_util::GetStringFUTF16(IDS_PLUGIN_OUTDATED, group_name));
705 break; 740 break;
706 } 741 }
707 case ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized: { 742 case ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized: {
708 placeholder = PluginPlaceholder::CreateBlockedPlugin( 743 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin(
709 render_view, frame, params, plugin, identifier, group_name, 744 render_view,
745 frame,
746 params,
747 plugin,
748 identifier,
749 group_name,
710 IDR_BLOCKED_PLUGIN_HTML, 750 IDR_BLOCKED_PLUGIN_HTML,
711 l10n_util::GetStringFUTF16(IDS_PLUGIN_NOT_AUTHORIZED, group_name)); 751 l10n_util::GetStringFUTF16(IDS_PLUGIN_NOT_AUTHORIZED, group_name));
712 placeholder->set_allow_loading(true); 752 placeholder->set_allow_loading(true);
713 render_view->Send(new ChromeViewHostMsg_BlockedUnauthorizedPlugin( 753 render_view->Send(new ChromeViewHostMsg_BlockedUnauthorizedPlugin(
714 render_view->GetRoutingID(), 754 render_view->GetRoutingID(),
715 group_name, 755 group_name,
716 identifier)); 756 identifier));
717 break; 757 break;
718 } 758 }
719 case ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay: { 759 case ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay: {
720 placeholder = PluginPlaceholder::CreateBlockedPlugin( 760 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin(
721 render_view, frame, params, plugin, identifier, group_name, 761 render_view,
762 frame,
763 params,
764 plugin,
765 identifier,
766 group_name,
722 IDR_CLICK_TO_PLAY_PLUGIN_HTML, 767 IDR_CLICK_TO_PLAY_PLUGIN_HTML,
723 l10n_util::GetStringFUTF16(IDS_PLUGIN_LOAD, group_name)); 768 l10n_util::GetStringFUTF16(IDS_PLUGIN_LOAD, group_name));
724 placeholder->set_allow_loading(true); 769 placeholder->set_allow_loading(true);
725 RenderThread::Get()->RecordUserMetrics("Plugin_ClickToPlay"); 770 RenderThread::Get()->RecordUserMetrics("Plugin_ClickToPlay");
726 observer->DidBlockContentType(content_type, identifier); 771 observer->DidBlockContentType(content_type, identifier);
727 break; 772 break;
728 } 773 }
729 case ChromeViewHostMsg_GetPluginInfo_Status::kBlocked: { 774 case ChromeViewHostMsg_GetPluginInfo_Status::kBlocked: {
730 placeholder = PluginPlaceholder::CreateBlockedPlugin( 775 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin(
731 render_view, frame, params, plugin, identifier, group_name, 776 render_view,
777 frame,
778 params,
779 plugin,
780 identifier,
781 group_name,
732 IDR_BLOCKED_PLUGIN_HTML, 782 IDR_BLOCKED_PLUGIN_HTML,
733 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); 783 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
734 placeholder->set_allow_loading(true); 784 placeholder->set_allow_loading(true);
735 RenderThread::Get()->RecordUserMetrics("Plugin_Blocked"); 785 RenderThread::Get()->RecordUserMetrics("Plugin_Blocked");
736 observer->DidBlockContentType(content_type, identifier); 786 observer->DidBlockContentType(content_type, identifier);
737 break; 787 break;
738 } 788 }
739 } 789 }
740 } 790 }
741 placeholder->SetStatus(status); 791 placeholder->SetStatus(status);
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 // SiteIsolationPolicy is off by default. We would like to activate cross-site 1359 // SiteIsolationPolicy is off by default. We would like to activate cross-site
1310 // document blocking (for UMA data collection) for normal renderer processes 1360 // document blocking (for UMA data collection) for normal renderer processes
1311 // running a normal web page from the Internet. We only turn on 1361 // running a normal web page from the Internet. We only turn on
1312 // SiteIsolationPolicy for a renderer process that does not have the extension 1362 // SiteIsolationPolicy for a renderer process that does not have the extension
1313 // flag on. 1363 // flag on.
1314 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1364 CommandLine* command_line = CommandLine::ForCurrentProcess();
1315 return !command_line->HasSwitch(switches::kExtensionProcess); 1365 return !command_line->HasSwitch(switches::kExtensionProcess);
1316 } 1366 }
1317 1367
1318 } // namespace chrome 1368 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698