Chromium Code Reviews| Index: third_party/WebKit/Source/core/frame/VisualViewport.h |
| diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.h b/third_party/WebKit/Source/core/frame/VisualViewport.h |
| index 0fa9a66f840cfbadffd51c68c6f2d3e26ec51fbd..7ac6dd9c210ea2d90da2b5551e79977d91243f64 100644 |
| --- a/third_party/WebKit/Source/core/frame/VisualViewport.h |
| +++ b/third_party/WebKit/Source/core/frame/VisualViewport.h |
| @@ -32,6 +32,7 @@ |
| #define VisualViewport_h |
| #include "core/CoreExport.h" |
| +#include "core/events/Event.h" |
|
esprehn
2016/03/31 05:15:37
I don't think you need this header
|
| #include "platform/geometry/FloatPoint.h" |
| #include "platform/geometry/FloatRect.h" |
| #include "platform/geometry/IntSize.h" |
| @@ -61,8 +62,13 @@ class LocalFrame; |
| // offset is set through the GraphicsLayer <-> CC sync mechanisms. Its contents is the page's |
| // main FrameView, which corresponds to the outer viewport. The inner viewport is always contained |
| // in the outer viewport and can pan within it. |
| -class CORE_EXPORT VisualViewport final : public NoBaseWillBeGarbageCollectedFinalized<VisualViewport>, public GraphicsLayerClient, public ScrollableArea { |
| +class CORE_EXPORT VisualViewport final |
| + : public NoBaseWillBeGarbageCollectedFinalized<VisualViewport> |
| + , public GraphicsLayerClient |
| + , public ScriptWrappable |
| + , public ScrollableArea { |
| WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(VisualViewport); |
| + DEFINE_WRAPPERTYPEINFO(); |
| public: |
| static PassOwnPtrWillBeRawPtr<VisualViewport> create(FrameHost& host) |
| { |
| @@ -197,6 +203,15 @@ public: |
| Widget* getWidget() override; |
| CompositorAnimationTimeline* compositorAnimationTimeline() const override; |
| + // Visual Viewport API implementation. |
| + double scrollLeft(); |
| + double scrollTop(); |
| + void setScrollLeft(double x); |
| + void setScrollTop(double y); |
| + double clientWidth(); |
| + double clientHeight(); |
| + double pageScale(); |
| + |
| // Used for gathering data on user pinch-zoom statistics. |
| void userDidChangeScale(); |
| void sendUMAMetrics(); |
| @@ -211,6 +226,10 @@ private: |
| bool visualViewportSuppliesScrollbars() const; |
| + void updateLayoutIgnorePendingStylesheets(); |
| + |
| + void enqueueChangedEvent(); |
| + |
| // GraphicsLayerClient implementation. |
| bool needsRepaint(const GraphicsLayer&) const { ASSERT_NOT_REACHED(); return true; } |
| IntRect computeInterestRect(const GraphicsLayer*, const IntRect&) const; |