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

Unified Diff: Source/web/PageOverlay.h

Issue 1264483002: PageOverlays: Remove PageOverlayList (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 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 | « Source/web/InspectorOverlayImpl.cpp ('k') | Source/web/PageOverlay.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/PageOverlay.h
diff --git a/Source/web/PageOverlay.h b/Source/web/PageOverlay.h
index b8467c6a781c3ca6e81e8c71d909b1360454a18f..85d8ad22127e94a7b1b7a1f202e6f4a88e462635 100644
--- a/Source/web/PageOverlay.h
+++ b/Source/web/PageOverlay.h
@@ -29,6 +29,7 @@
#ifndef PageOverlay_h
#define PageOverlay_h
+#include "platform/graphics/GraphicsLayer.h"
#include "platform/graphics/GraphicsLayerClient.h"
#include "platform/graphics/paint/DisplayItemClient.h"
#include "wtf/OwnPtr.h"
@@ -38,28 +39,29 @@
namespace blink {
class GraphicsContext;
-class GraphicsLayer;
class WebPageOverlay;
class WebViewImpl;
+class WebGraphicsContext;
// Manages a layer that is overlaid on a WebView's content.
// Clients can paint by implementing WebPageOverlay.
//
// With Slimming Paint, internal clients can extract a GraphicsContext to add
-// to the DisplayItemList owned by the GraphicsLayer.
+// to the DisplayItemList owned by the GraphicsLayer
class PageOverlay : public GraphicsLayerClient {
public:
- static PassOwnPtr<PageOverlay> create(WebViewImpl*, WebPageOverlay*);
- ~PageOverlay() { }
+ class Delegate {
+ public:
+ // Paints page overlay contents.
+ virtual void paintPageOverlay(WebGraphicsContext*, const WebSize& webViewSize) = 0;
+ virtual ~Delegate() { }
+ };
- WebPageOverlay* overlay() const { return m_overlay; }
- void setOverlay(WebPageOverlay* overlay) { m_overlay = overlay; }
+ static PassOwnPtr<PageOverlay> create(WebViewImpl*, PassOwnPtr<PageOverlay::Delegate>);
- int zOrder() const { return m_zOrder; }
- void setZOrder(int zOrder) { m_zOrder = zOrder; }
+ ~PageOverlay();
- void clear();
void update();
void paintWebFrame(GraphicsContext&);
@@ -72,13 +74,12 @@ public:
String debugName(const GraphicsLayer*) override;
private:
- PageOverlay(WebViewImpl*, WebPageOverlay*);
+ PageOverlay(WebViewImpl*, PassOwnPtr<PageOverlay::Delegate>);
void invalidateWebFrame();
WebViewImpl* m_viewImpl;
- WebPageOverlay* m_overlay;
+ OwnPtr<PageOverlay::Delegate> m_overlay;
OwnPtr<GraphicsLayer> m_layer;
- int m_zOrder;
};
} // namespace blink
« no previous file with comments | « Source/web/InspectorOverlayImpl.cpp ('k') | Source/web/PageOverlay.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698