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

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

Issue 2378573005: [HBD] Blanket BLOCK on all non-HTTP(s) and non-FILE URLs for Flash. (Closed)
Patch Set: fix dat merge Created 4 years, 2 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 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 <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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 prerender::PrerenderMode mode) { 282 prerender::PrerenderMode mode) {
283 OnSetIsPrerendering(mode != prerender::NO_PRERENDER); 283 OnSetIsPrerendering(mode != prerender::NO_PRERENDER);
284 } 284 }
285 285
286 void ChromePluginPlaceholder::PluginListChanged() { 286 void ChromePluginPlaceholder::PluginListChanged() {
287 if (!GetFrame() || !plugin()) 287 if (!GetFrame() || !plugin())
288 return; 288 return;
289 289
290 ChromeViewHostMsg_GetPluginInfo_Output output; 290 ChromeViewHostMsg_GetPluginInfo_Output output;
291 std::string mime_type(GetPluginParams().mimeType.utf8()); 291 std::string mime_type(GetPluginParams().mimeType.utf8());
292 blink::WebString top_origin = 292 render_frame()->Send(new ChromeViewHostMsg_GetPluginInfo(
293 GetFrame()->top()->getSecurityOrigin().toString(); 293 routing_id(), GURL(GetPluginParams().url),
294 render_frame()->Send( 294 GetFrame()->top()->getSecurityOrigin(), mime_type, &output));
295 new ChromeViewHostMsg_GetPluginInfo(routing_id(),
296 GURL(GetPluginParams().url),
297 blink::WebStringToGURL(top_origin),
298 mime_type,
299 &output));
300 if (output.status == status_) 295 if (output.status == status_)
301 return; 296 return;
302 blink::WebPlugin* new_plugin = ChromeContentRendererClient::CreatePlugin( 297 blink::WebPlugin* new_plugin = ChromeContentRendererClient::CreatePlugin(
303 render_frame(), GetFrame(), GetPluginParams(), output); 298 render_frame(), GetFrame(), GetPluginParams(), output);
304 ReplacePlugin(new_plugin); 299 ReplacePlugin(new_plugin);
305 if (!new_plugin) { 300 if (!new_plugin) {
306 PluginUMAReporter::GetInstance()->ReportPluginMissing( 301 PluginUMAReporter::GetInstance()->ReportPluginMissing(
307 GetPluginParams().mimeType.utf8(), GURL(GetPluginParams().url)); 302 GetPluginParams().mimeType.utf8(), GURL(GetPluginParams().url));
308 } 303 }
309 } 304 }
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 422
428 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 423 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
429 switches::kEnablePluginPlaceholderTesting)) { 424 switches::kEnablePluginPlaceholderTesting)) {
430 builder.SetMethod<void (ChromePluginPlaceholder::*)()>( 425 builder.SetMethod<void (ChromePluginPlaceholder::*)()>(
431 "didFinishIconRepositionForTesting", 426 "didFinishIconRepositionForTesting",
432 &ChromePluginPlaceholder::DidFinishIconRepositionForTestingCallback); 427 &ChromePluginPlaceholder::DidFinishIconRepositionForTestingCallback);
433 } 428 }
434 429
435 return builder; 430 return builder;
436 } 431 }
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | content/browser/frame_host/render_frame_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698