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

Side by Side Diff: Source/core/html/HTMLPlugInImageElement.cpp

Issue 23549009: Add toPluginDocument() convenience method that takes a reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLEmbedElement.cpp ('k') | Source/core/html/PluginDocument.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 /* 1 /*
2 * Copyright (C) 2008, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 253
254 // FIXME: This code should not depend on renderer! 254 // FIXME: This code should not depend on renderer!
255 if (!renderer || useFallback) 255 if (!renderer || useFallback)
256 return false; 256 return false;
257 257
258 LOG(Plugins, "%p Plug-in URL: %s", this, m_url.utf8().data()); 258 LOG(Plugins, "%p Plug-in URL: %s", this, m_url.utf8().data());
259 LOG(Plugins, " Loaded URL: %s", url.string().utf8().data()); 259 LOG(Plugins, " Loaded URL: %s", url.string().utf8().data());
260 m_loadedUrl = url; 260 m_loadedUrl = url;
261 261
262 IntSize contentSize = roundedIntSize(LayoutSize(renderer->contentWidth(), re nderer->contentHeight())); 262 IntSize contentSize = roundedIntSize(LayoutSize(renderer->contentWidth(), re nderer->contentHeight()));
263 bool loadManually = document().isPluginDocument() && !frame->loader()->conta insPlugins() && toPluginDocument(&document())->shouldLoadPluginManually(); 263 bool loadManually = document().isPluginDocument() && !frame->loader()->conta insPlugins() && toPluginDocument(document()).shouldLoadPluginManually();
264 RefPtr<Widget> widget = frame->loader()->client()->createPlugin(contentSize, this, url, paramNames, paramValues, mimeType, loadManually); 264 RefPtr<Widget> widget = frame->loader()->client()->createPlugin(contentSize, this, url, paramNames, paramValues, mimeType, loadManually);
265 265
266 if (!widget) { 266 if (!widget) {
267 if (!renderer->showsUnavailablePluginIndicator()) 267 if (!renderer->showsUnavailablePluginIndicator())
268 renderer->setPluginUnavailabilityReason(RenderEmbeddedObject::Plugin Missing); 268 renderer->setPluginUnavailabilityReason(RenderEmbeddedObject::Plugin Missing);
269 return false; 269 return false;
270 } 270 }
271 271
272 renderer->setWidget(widget); 272 renderer->setWidget(widget);
273 frame->loader()->setContainsPlugins(); 273 frame->loader()->setContainsPlugins();
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje ct::PluginBlockedByContentSecurityPolicy); 322 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje ct::PluginBlockedByContentSecurityPolicy);
323 return false; 323 return false;
324 } 324 }
325 325
326 if (frame->loader() && !frame->loader()->mixedContentChecker()->canRunInsecu reContent(document().securityOrigin(), url)) 326 if (frame->loader() && !frame->loader()->mixedContentChecker()->canRunInsecu reContent(document().securityOrigin(), url))
327 return false; 327 return false;
328 return true; 328 return true;
329 } 329 }
330 330
331 } // namespace WebCore 331 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLEmbedElement.cpp ('k') | Source/core/html/PluginDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698