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

Side by Side Diff: chrome/renderer/plugins/shadow_dom_plugin_placeholder.cc

Issue 1069703002: Replace the struct workaround for forward-declaring ChromeViewHostMsg_GetPluginInfo_Status with a p… (Closed) Base URL: https://chromium.googlesource.com/chromium/src@issue444203
Patch Set: update base branch Created 5 years, 8 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/renderer/plugins/chrome_plugin_placeholder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/plugins/shadow_dom_plugin_placeholder.h" 5 #include "chrome/renderer/plugins/shadow_dom_plugin_placeholder.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 #include "chrome/common/render_messages.h" 9 #include "chrome/common/render_messages.h"
10 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // TODO(jbroman): Investigate whether browser plugin needs special handling. 46 // TODO(jbroman): Investigate whether browser plugin needs special handling.
47 ChromeViewHostMsg_GetPluginInfo_Output output; 47 ChromeViewHostMsg_GetPluginInfo_Output output;
48 #if defined(ENABLE_PLUGINS) 48 #if defined(ENABLE_PLUGINS)
49 render_frame->Send( 49 render_frame->Send(
50 new ChromeViewHostMsg_GetPluginInfo(render_frame->GetRoutingID(), 50 new ChromeViewHostMsg_GetPluginInfo(render_frame->GetRoutingID(),
51 GURL(orig_params.url), 51 GURL(orig_params.url),
52 frame->top()->document().url(), 52 frame->top()->document().url(),
53 orig_mime_type, 53 orig_mime_type,
54 &output)); 54 &output));
55 #else 55 #else
56 output.status.value = Status::kNotFound; 56 output.status = Status::kNotFound;
57 #endif 57 #endif
58 58
59 if (output.status.value == Status::kNotFound) { 59 if (output.status == Status::kNotFound) {
60 // TODO(jbroman): Handle YouTube specially here, as in 60 // TODO(jbroman): Handle YouTube specially here, as in
61 // ChromeContentRendererClient::CreatePlugin. 61 // ChromeContentRendererClient::CreatePlugin.
62 PluginUMAReporter::GetInstance()->ReportPluginMissing(orig_mime_type, 62 PluginUMAReporter::GetInstance()->ReportPluginMissing(orig_mime_type,
63 orig_params.url); 63 orig_params.url);
64 return CreateShadowDOMPlaceholderForMissingPlugin(); 64 return CreateShadowDOMPlaceholderForMissingPlugin();
65 } 65 }
66 66
67 return nullptr; 67 return nullptr;
68 } 68 }
69 69
70 scoped_ptr<blink::WebPluginPlaceholder> 70 scoped_ptr<blink::WebPluginPlaceholder>
71 CreateShadowDOMPlaceholderForMissingPlugin() { 71 CreateShadowDOMPlaceholderForMissingPlugin() {
72 return make_scoped_ptr(new MissingPluginPlaceholder); 72 return make_scoped_ptr(new MissingPluginPlaceholder);
73 } 73 }
OLDNEW
« no previous file with comments | « chrome/renderer/plugins/chrome_plugin_placeholder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698