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

Unified Diff: third_party/WebKit/Source/web/PageOverlay.h

Issue 2149143002: Move PageOverlay::Delegate off the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mild cleanup Created 4 years, 5 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 | « third_party/WebKit/Source/web/InspectorOverlay.cpp ('k') | third_party/WebKit/Source/web/PageOverlay.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/PageOverlay.h
diff --git a/third_party/WebKit/Source/web/PageOverlay.h b/third_party/WebKit/Source/web/PageOverlay.h
index 09a6c3a292cf8133da221864a35a7df736196ebc..2c20b01cf3d5c08bcd8992b63df5f87dd9bf6218 100644
--- a/third_party/WebKit/Source/web/PageOverlay.h
+++ b/third_party/WebKit/Source/web/PageOverlay.h
@@ -44,16 +44,15 @@ class WebViewImpl;
// Manages a layer that is overlaid on a WebView's content.
class WEB_EXPORT PageOverlay : public GraphicsLayerClient, public DisplayItemClient {
public:
- class Delegate : public GarbageCollectedFinalized<Delegate> {
+ class Delegate {
public:
- DEFINE_INLINE_VIRTUAL_TRACE() { }
+ virtual ~Delegate() { }
// Paints page overlay contents.
virtual void paintPageOverlay(const PageOverlay&, GraphicsContext&, const WebSize& webViewSize) const = 0;
- virtual ~Delegate() { }
};
- static std::unique_ptr<PageOverlay> create(WebViewImpl*, PageOverlay::Delegate*);
+ static std::unique_ptr<PageOverlay> create(WebViewImpl*, std::unique_ptr<PageOverlay::Delegate>);
~PageOverlay();
@@ -72,10 +71,10 @@ public:
String debugName(const GraphicsLayer*) const override;
private:
- PageOverlay(WebViewImpl*, PageOverlay::Delegate*);
+ PageOverlay(WebViewImpl*, std::unique_ptr<PageOverlay::Delegate>);
WebViewImpl* m_viewImpl;
- Persistent<PageOverlay::Delegate> m_delegate;
+ std::unique_ptr<PageOverlay::Delegate> m_delegate;
std::unique_ptr<GraphicsLayer> m_layer;
};
« no previous file with comments | « third_party/WebKit/Source/web/InspectorOverlay.cpp ('k') | third_party/WebKit/Source/web/PageOverlay.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698