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

Unified Diff: Source/web/WebFrameImpl.cpp

Issue 23570006: Refactoring: Add convenience method toPluginContainerImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rework with comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/ContextMenuClientImpl.cpp ('k') | Source/web/WebHelperPluginImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebFrameImpl.cpp
diff --git a/Source/web/WebFrameImpl.cpp b/Source/web/WebFrameImpl.cpp
index be589dae3eed0f3a89c53d7c6449aa18759db7c1..02aa36db47415e843a16ac53eb9e2c439f534d38 100644
--- a/Source/web/WebFrameImpl.cpp
+++ b/Source/web/WebFrameImpl.cpp
@@ -281,7 +281,7 @@ WebPluginContainerImpl* WebFrameImpl::pluginContainerFromFrame(Frame* frame)
if (!frame->document() || !frame->document()->isPluginDocument())
return 0;
PluginDocument* pluginDocument = static_cast<PluginDocument*>(frame->document());
- return static_cast<WebPluginContainerImpl *>(pluginDocument->pluginWidget());
+ return toPluginContainerImpl(pluginDocument->pluginWidget());
}
WebPluginContainerImpl* WebFrameImpl::pluginContainerFromNode(WebCore::Frame* frame, const WebNode& node)
@@ -289,7 +289,7 @@ WebPluginContainerImpl* WebFrameImpl::pluginContainerFromNode(WebCore::Frame* fr
WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame);
if (pluginContainer)
return pluginContainer;
- return static_cast<WebPluginContainerImpl*>(node.pluginContainer());
+ return toPluginContainerImpl(node.pluginContainer());
}
// Simple class to override some of PrintContext behavior. Some of the methods
@@ -1396,7 +1396,7 @@ int WebFrameImpl::printBegin(const WebPrintParams& printParams, const WebNode& c
pluginContainer = pluginContainerFromFrame(frame());
} else {
// We only support printing plugin nodes for now.
- pluginContainer = static_cast<WebPluginContainerImpl*>(constrainToNode.pluginContainer());
+ pluginContainer = toPluginContainerImpl(constrainToNode.pluginContainer());
}
if (pluginContainer && pluginContainer->supportsPaginatedPrint())
@@ -1444,7 +1444,7 @@ void WebFrameImpl::printEnd()
bool WebFrameImpl::isPrintScalingDisabledForPlugin(const WebNode& node)
{
- WebPluginContainerImpl* pluginContainer = node.isNull() ? pluginContainerFromFrame(frame()) : static_cast<WebPluginContainerImpl*>(node.pluginContainer());
+ WebPluginContainerImpl* pluginContainer = node.isNull() ? pluginContainerFromFrame(frame()) : toPluginContainerImpl(node.pluginContainer());
if (!pluginContainer || !pluginContainer->supportsPaginatedPrint())
return false;
« no previous file with comments | « Source/web/ContextMenuClientImpl.cpp ('k') | Source/web/WebHelperPluginImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698