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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 26564006: Cleanup: Add conversion interface for WebWidget derived classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebPopupMenuImpl.h ('k') | public/web/WebWidget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index a4a9694d86f5f28d9c19699065e101a78aeea5e5..079b4ae6734d5c3e154e0c4ccee22e82525da2cf 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -1577,7 +1577,7 @@ PagePopup* WebViewImpl::openPagePopup(PagePopupClient* client, const IntRect& or
WebWidget* popupWidget = m_client->createPopupMenu(WebPopupTypePage);
ASSERT(popupWidget);
- m_pagePopup = static_cast<WebPagePopupImpl*>(popupWidget);
+ m_pagePopup = toWebPagePopupImpl(popupWidget);
if (!m_pagePopup->initialize(this, client, originBoundsInRootView)) {
m_pagePopup->closePopup();
m_pagePopup = 0;
@@ -1588,7 +1588,7 @@ PagePopup* WebViewImpl::openPagePopup(PagePopupClient* client, const IntRect& or
void WebViewImpl::closePagePopup(PagePopup* popup)
{
ASSERT(popup);
- WebPagePopupImpl* popupImpl = static_cast<WebPagePopupImpl*>(popup);
+ WebPagePopupImpl* popupImpl = toWebPagePopupImpl(popup);
ASSERT(m_pagePopup.get() == popupImpl);
if (m_pagePopup.get() != popupImpl)
return;
@@ -1608,7 +1608,7 @@ WebHelperPluginImpl* WebViewImpl::createHelperPlugin(const String& pluginType, c
{
WebWidget* popupWidget = m_client->createPopupMenu(WebPopupTypeHelperPlugin);
ASSERT(popupWidget);
- WebHelperPluginImpl* helperPlugin = static_cast<WebHelperPluginImpl*>(popupWidget);
+ WebHelperPluginImpl* helperPlugin = toWebHelperPluginImpl(popupWidget);
if (!helperPlugin->initialize(pluginType, hostDocument, this)) {
helperPlugin->closeHelperPlugin();
@@ -3828,7 +3828,7 @@ void WebViewImpl::refreshAutofillPopup()
WebRect newWidgetRect = m_autofillPopup->refresh(focusedElement()->pixelSnappedBoundingBox());
// Let's resize the backing window if necessary.
- WebPopupMenuImpl* popupMenu = static_cast<WebPopupMenuImpl*>(m_autofillPopup->client());
+ WebPopupMenuImpl* popupMenu = toWebPopupMenuImpl(m_autofillPopup->client());
if (popupMenu && popupMenu->client()->windowRect() != newWidgetRect)
popupMenu->client()->setWindowRect(newWidgetRect);
}
« no previous file with comments | « Source/web/WebPopupMenuImpl.h ('k') | public/web/WebWidget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698