| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * | 10 * |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "platform/graphics/GraphicsLayer.h" | 32 #include "platform/graphics/GraphicsLayer.h" |
| 33 #include "platform/graphics/GraphicsLayerClient.h" | 33 #include "platform/graphics/GraphicsLayerClient.h" |
| 34 #include "platform/graphics/paint/DisplayItemClient.h" | 34 #include "platform/graphics/paint/DisplayItemClient.h" |
| 35 #include "web/WebExport.h" | 35 #include "web/WebExport.h" |
| 36 #include "wtf/text/WTFString.h" | 36 #include "wtf/text/WTFString.h" |
| 37 #include <memory> | 37 #include <memory> |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 class GraphicsContext; | 41 class GraphicsContext; |
| 42 class WebPageOverlay; | |
| 43 class WebViewImpl; | 42 class WebViewImpl; |
| 44 | 43 |
| 45 // Manages a layer that is overlaid on a WebView's content. | 44 // Manages a layer that is overlaid on a WebView's content. |
| 46 // Clients can paint by implementing WebPageOverlay. | |
| 47 // | |
| 48 // With Slimming Paint, internal clients can extract a GraphicsContext to add | |
| 49 // to the PaintController owned by the GraphicsLayer | |
| 50 class WEB_EXPORT PageOverlay : public GraphicsLayerClient, public DisplayItemCli
ent { | 45 class WEB_EXPORT PageOverlay : public GraphicsLayerClient, public DisplayItemCli
ent { |
| 51 public: | 46 public: |
| 52 class Delegate : public GarbageCollectedFinalized<Delegate> { | 47 class Delegate : public GarbageCollectedFinalized<Delegate> { |
| 53 public: | 48 public: |
| 54 DEFINE_INLINE_VIRTUAL_TRACE() { } | 49 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 55 | 50 |
| 56 // Paints page overlay contents. | 51 // Paints page overlay contents. |
| 57 virtual void paintPageOverlay(const PageOverlay&, GraphicsContext&, cons
t WebSize& webViewSize) const = 0; | 52 virtual void paintPageOverlay(const PageOverlay&, GraphicsContext&, cons
t WebSize& webViewSize) const = 0; |
| 58 virtual ~Delegate() { } | 53 virtual ~Delegate() { } |
| 59 }; | 54 }; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 80 PageOverlay(WebViewImpl*, PageOverlay::Delegate*); | 75 PageOverlay(WebViewImpl*, PageOverlay::Delegate*); |
| 81 | 76 |
| 82 WebViewImpl* m_viewImpl; | 77 WebViewImpl* m_viewImpl; |
| 83 Persistent<PageOverlay::Delegate> m_delegate; | 78 Persistent<PageOverlay::Delegate> m_delegate; |
| 84 std::unique_ptr<GraphicsLayer> m_layer; | 79 std::unique_ptr<GraphicsLayer> m_layer; |
| 85 }; | 80 }; |
| 86 | 81 |
| 87 } // namespace blink | 82 } // namespace blink |
| 88 | 83 |
| 89 #endif // PageOverlay_h | 84 #endif // PageOverlay_h |
| OLD | NEW |