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

Unified Diff: Source/web/InspectorOverlayImpl.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/InspectorOverlayImpl.h ('k') | Source/web/WebPagePopupImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/InspectorOverlayImpl.cpp
diff --git a/Source/web/InspectorOverlayImpl.cpp b/Source/web/InspectorOverlayImpl.cpp
index c77a18048c2519f289e48ddb1b597fd5ab119d1d..eacf1fff9eb77b4c78bef153c11af40f20130c00 100644
--- a/Source/web/InspectorOverlayImpl.cpp
+++ b/Source/web/InspectorOverlayImpl.cpp
@@ -110,39 +110,51 @@ private:
};
-class InspectorOverlayImpl::InspectorOverlayChromeClient final: public EmptyChromeClient {
+class InspectorOverlayImpl::InspectorOverlayChromeClient final : public EmptyChromeClient {
public:
- InspectorOverlayChromeClient(ChromeClient& client, InspectorOverlayImpl& overlay)
- : m_client(client)
- , m_overlay(overlay)
- { }
+ static PassOwnPtrWillBeRawPtr<InspectorOverlayChromeClient> create(ChromeClient& client, InspectorOverlayImpl& overlay)
+ {
+ return adoptPtrWillBeNoop(new InspectorOverlayChromeClient(client, overlay));
+ }
+
+ DEFINE_INLINE_VIRTUAL_TRACE()
+ {
+ visitor->trace(m_client);
+ visitor->trace(m_overlay);
+ EmptyChromeClient::trace(visitor);
+ }
void setCursor(const Cursor& cursor) override
{
- m_client.setCursor(cursor);
+ m_client->setCursor(cursor);
}
void setToolTip(const String& tooltip, TextDirection direction) override
{
- m_client.setToolTip(tooltip, direction);
+ m_client->setToolTip(tooltip, direction);
}
void invalidateRect(const IntRect&) override
{
- m_overlay.invalidate();
+ m_overlay->invalidate();
}
void scheduleAnimation() override
{
- if (m_overlay.m_inLayout)
+ if (m_overlay->m_inLayout)
return;
- m_client.scheduleAnimation();
+ m_client->scheduleAnimation();
}
private:
- ChromeClient& m_client;
- InspectorOverlayImpl& m_overlay;
+ InspectorOverlayChromeClient(ChromeClient& client, InspectorOverlayImpl& overlay)
+ : m_client(&client)
+ , m_overlay(&overlay)
+ { }
+
+ RawPtrWillBeMember<ChromeClient> m_client;
+ RawPtrWillBeMember<InspectorOverlayImpl> m_overlay;
};
@@ -177,6 +189,7 @@ DEFINE_TRACE(InspectorOverlayImpl)
visitor->trace(m_highlightNode);
visitor->trace(m_eventTargetNode);
visitor->trace(m_overlayPage);
+ visitor->trace(m_overlayChromeClient);
visitor->trace(m_overlayHost);
visitor->trace(m_listener);
visitor->trace(m_layoutEditor);
@@ -384,7 +397,7 @@ Page* InspectorOverlayImpl::overlayPage()
Page::PageClients pageClients;
fillWithEmptyClients(pageClients);
ASSERT(!m_overlayChromeClient);
- m_overlayChromeClient = adoptPtr(new InspectorOverlayChromeClient(m_webViewImpl->page()->chromeClient(), *this));
+ m_overlayChromeClient = InspectorOverlayChromeClient::create(m_webViewImpl->page()->chromeClient(), *this);
pageClients.chromeClient = m_overlayChromeClient.get();
m_overlayPage = adoptPtrWillBeNoop(new Page(pageClients));
« no previous file with comments | « Source/web/InspectorOverlayImpl.h ('k') | Source/web/WebPagePopupImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698