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/chrome_plugin_placeholder.h" | 5 #include "chrome/renderer/plugins/chrome_plugin_placeholder.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 | 253 |
254 void ChromePluginPlaceholder::PluginListChanged() { | 254 void ChromePluginPlaceholder::PluginListChanged() { |
255 if (!GetFrame() || !plugin()) | 255 if (!GetFrame() || !plugin()) |
256 return; | 256 return; |
257 blink::WebDocument document = GetFrame()->top()->document(); | 257 blink::WebDocument document = GetFrame()->top()->document(); |
258 if (document.isNull()) | 258 if (document.isNull()) |
259 return; | 259 return; |
260 | 260 |
261 ChromeViewHostMsg_GetPluginInfo_Output output; | 261 ChromeViewHostMsg_GetPluginInfo_Output output; |
262 std::string mime_type(GetPluginParams().mimeType.utf8()); | 262 std::string mime_type(GetPluginParams().mimeType.utf8()); |
263 blink::WebString top_origin = GetFrame()->top()->securityOrigin().toString(); | 263 blink::WebString top_origin = |
| 264 GetFrame()->top()->getSecurityOrigin().toString(); |
264 render_frame()->Send( | 265 render_frame()->Send( |
265 new ChromeViewHostMsg_GetPluginInfo(routing_id(), | 266 new ChromeViewHostMsg_GetPluginInfo(routing_id(), |
266 GURL(GetPluginParams().url), | 267 GURL(GetPluginParams().url), |
267 blink::WebStringToGURL(top_origin), | 268 blink::WebStringToGURL(top_origin), |
268 mime_type, | 269 mime_type, |
269 &output)); | 270 &output)); |
270 if (output.status == status_) | 271 if (output.status == status_) |
271 return; | 272 return; |
272 blink::WebPlugin* new_plugin = ChromeContentRendererClient::CreatePlugin( | 273 blink::WebPlugin* new_plugin = ChromeContentRendererClient::CreatePlugin( |
273 render_frame(), GetFrame(), GetPluginParams(), output); | 274 render_frame(), GetFrame(), GetPluginParams(), output); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 | 385 |
385 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 386 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
386 switches::kEnablePluginPlaceholderTesting)) { | 387 switches::kEnablePluginPlaceholderTesting)) { |
387 builder.SetMethod<void (ChromePluginPlaceholder::*)()>( | 388 builder.SetMethod<void (ChromePluginPlaceholder::*)()>( |
388 "didFinishIconRepositionForTesting", | 389 "didFinishIconRepositionForTesting", |
389 &ChromePluginPlaceholder::DidFinishIconRepositionForTestingCallback); | 390 &ChromePluginPlaceholder::DidFinishIconRepositionForTestingCallback); |
390 } | 391 } |
391 | 392 |
392 return builder; | 393 return builder; |
393 } | 394 } |
OLD | NEW |