OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |