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

Unified Diff: Source/web/WebPagePopupImpl.cpp

Issue 1291903003: Oilpan: Move ChromeClient classes into Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix a raw reference in InspectorOverlayImpl.cpp. Created 5 years, 4 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/WebPagePopupImpl.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebPagePopupImpl.cpp
diff --git a/Source/web/WebPagePopupImpl.cpp b/Source/web/WebPagePopupImpl.cpp
index 8d1a0287f8e87848df10a45d5d914af36c83adef..7bcca7ee36afbe95a0be35eeedeb40b57af5b54f 100644
--- a/Source/web/WebPagePopupImpl.cpp
+++ b/Source/web/WebPagePopupImpl.cpp
@@ -66,14 +66,10 @@
namespace blink {
class PagePopupChromeClient final : public EmptyChromeClient {
- WTF_MAKE_NONCOPYABLE(PagePopupChromeClient);
- WTF_MAKE_FAST_ALLOCATED(PagePopupChromeClient);
-
public:
- explicit PagePopupChromeClient(WebPagePopupImpl* popup)
- : m_popup(popup)
+ static PassOwnPtrWillBeRawPtr<PagePopupChromeClient> create(WebPagePopupImpl* popup)
{
- ASSERT(m_popup->widgetClient());
+ return adoptPtrWillBeNoop(new PagePopupChromeClient(popup));
}
void setWindowRect(const IntRect& rect) override
@@ -83,6 +79,12 @@ public:
}
private:
+ explicit PagePopupChromeClient(WebPagePopupImpl* popup)
+ : m_popup(popup)
+ {
+ ASSERT(m_popup->widgetClient());
+ }
+
void closeWindowSoon() override
{
m_popup->closePopup();
@@ -229,7 +231,7 @@ bool WebPagePopupImpl::initializePage()
{
Page::PageClients pageClients;
fillWithEmptyClients(pageClients);
- m_chromeClient = adoptPtr(new PagePopupChromeClient(this));
+ m_chromeClient = PagePopupChromeClient::create(this);
pageClients.chromeClient = m_chromeClient.get();
m_page = adoptPtrWillBeNoop(new Page(pageClients));
« no previous file with comments | « Source/web/WebPagePopupImpl.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698