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

Unified Diff: Source/web/WebPagePopupImpl.cpp

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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/WebPagePopupImpl.cpp
diff --git a/Source/web/WebPagePopupImpl.cpp b/Source/web/WebPagePopupImpl.cpp
index 539f512bb556050a3b4667fdf23bec6da9c53b24..e203a404673e4a48e022d1e65d2c0a5fbe744191 100644
--- a/Source/web/WebPagePopupImpl.cpp
+++ b/Source/web/WebPagePopupImpl.cpp
@@ -197,7 +197,7 @@ bool WebPagePopupImpl::initializePage()
m_page->settings().setDeviceSupportsTouch(m_webView->page()->settings().deviceSupportsTouch());
static ContextFeaturesClient* pagePopupFeaturesClient = new PagePopupFeaturesClient();
- provideContextFeaturesTo(m_page.get(), pagePopupFeaturesClient);
+ provideContextFeaturesTo(*m_page, pagePopupFeaturesClient);
static FrameLoaderClient* emptyFrameLoaderClient = new EmptyFrameLoaderClient();
RefPtr<Frame> frame = Frame::create(FrameInit::create(0, &m_page->frameHost(), emptyFrameLoaderClient));
frame->setView(FrameView::create(frame.get()));
@@ -205,7 +205,8 @@ bool WebPagePopupImpl::initializePage()
frame->view()->resize(m_popupClient->contentSize());
frame->view()->setTransparent(false);
- DOMWindowPagePopup::install(frame->domWindow(), m_popupClient);
+ ASSERT(frame->domWindow());
+ DOMWindowPagePopup::install(*frame->domWindow(), m_popupClient);
RefPtr<SharedBuffer> data = SharedBuffer::create();
m_popupClient->writeDocument(data.get());
@@ -313,7 +314,8 @@ void WebPagePopupImpl::closePopup()
if (m_page) {
m_page->clearPageGroup();
m_page->mainFrame()->loader().stopAllLoaders();
- DOMWindowPagePopup::uninstall(m_page->mainFrame()->domWindow());
+ ASSERT(m_page->mainFrame()->domWindow());
+ DOMWindowPagePopup::uninstall(*m_page->mainFrame()->domWindow());
}
m_closing = true;

Powered by Google App Engine
This is Rietveld 408576698