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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 26434002: Cleanup: Add more conversion helpers for usage. (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
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index f9ccfa3e67d41b14b973868bf617c559efcd19a3..359fed79dea8ab4d81cbbaefaef0bf16e1ab0d94 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -1573,7 +1573,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;
@@ -1584,7 +1584,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;
@@ -1604,7 +1604,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();
@@ -3819,7 +3819,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);
}

Powered by Google App Engine
This is Rietveld 408576698