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

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

Issue 2348693003: [HBD] Placeholder for Flash content without fallback. (Closed)
Patch Set: address comments Created 4 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
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/renderer/plugins/chrome_plugin_placeholder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 std::move(throttler)); 822 std::move(throttler));
823 } 823 }
824 case ChromeViewHostMsg_GetPluginInfo_Status::kDisabled: { 824 case ChromeViewHostMsg_GetPluginInfo_Status::kDisabled: {
825 PluginUMAReporter::GetInstance()->ReportPluginDisabled(orig_mime_type, 825 PluginUMAReporter::GetInstance()->ReportPluginDisabled(orig_mime_type,
826 url); 826 url);
827 placeholder = create_blocked_plugin( 827 placeholder = create_blocked_plugin(
828 IDR_DISABLED_PLUGIN_HTML, 828 IDR_DISABLED_PLUGIN_HTML,
829 l10n_util::GetStringFUTF16(IDS_PLUGIN_DISABLED, group_name)); 829 l10n_util::GetStringFUTF16(IDS_PLUGIN_DISABLED, group_name));
830 break; 830 break;
831 } 831 }
832 case ChromeViewHostMsg_GetPluginInfo_Status::kFlashHiddenPreferHtml: {
833 placeholder = create_blocked_plugin(
834 IDR_PREFER_HTML_PLUGIN_HTML,
835 l10n_util::GetStringFUTF16(IDS_PLUGIN_PREFER_HTML_BY_DEFAULT,
836 group_name));
837 break;
838 }
832 case ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedBlocked: { 839 case ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedBlocked: {
833 #if defined(ENABLE_PLUGIN_INSTALLATION) 840 #if defined(ENABLE_PLUGIN_INSTALLATION)
834 placeholder = create_blocked_plugin( 841 placeholder = create_blocked_plugin(
835 IDR_BLOCKED_PLUGIN_HTML, 842 IDR_BLOCKED_PLUGIN_HTML,
836 l10n_util::GetStringFUTF16(IDS_PLUGIN_OUTDATED, group_name)); 843 l10n_util::GetStringFUTF16(IDS_PLUGIN_OUTDATED, group_name));
837 placeholder->AllowLoading(); 844 placeholder->AllowLoading();
838 render_frame->Send(new ChromeViewHostMsg_BlockedOutdatedPlugin( 845 render_frame->Send(new ChromeViewHostMsg_BlockedOutdatedPlugin(
839 render_frame->GetRoutingID(), placeholder->CreateRoutingId(), 846 render_frame->GetRoutingID(), placeholder->CreateRoutingId(),
840 identifier)); 847 identifier));
841 #else 848 #else
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 1480
1474 url::Replacements<char> r; 1481 url::Replacements<char> r;
1475 r.SetPath(path.c_str(), url::Component(0, path.length())); 1482 r.SetPath(path.c_str(), url::Component(0, path.length()));
1476 1483
1477 if (result == internal::NUM_PLUGIN_ERROR) 1484 if (result == internal::NUM_PLUGIN_ERROR)
1478 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS; 1485 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS;
1479 1486
1480 RecordYouTubeRewriteUMA(result); 1487 RecordYouTubeRewriteUMA(result);
1481 return corrected_url.ReplaceComponents(r); 1488 return corrected_url.ReplaceComponents(r);
1482 } 1489 }
OLDNEW
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/renderer/plugins/chrome_plugin_placeholder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698