OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 bool shouldPlaceVerticalScrollbarOnLeft() const override { return false; } | 188 bool shouldPlaceVerticalScrollbarOnLeft() const override { return false; } |
189 void invalidateScrollbarRect(Scrollbar*, const IntRect&) override; | 189 void invalidateScrollbarRect(Scrollbar*, const IntRect&) override; |
190 void invalidateScrollCornerRect(const IntRect&) override { } | 190 void invalidateScrollCornerRect(const IntRect&) override { } |
191 void setScrollOffset(const IntPoint&, ScrollType) override; | 191 void setScrollOffset(const IntPoint&, ScrollType) override; |
192 void setScrollOffset(const DoublePoint&, ScrollType) override; | 192 void setScrollOffset(const DoublePoint&, ScrollType) override; |
193 GraphicsLayer* layerForContainer() const override; | 193 GraphicsLayer* layerForContainer() const override; |
194 GraphicsLayer* layerForScrolling() const override; | 194 GraphicsLayer* layerForScrolling() const override; |
195 GraphicsLayer* layerForHorizontalScrollbar() const override; | 195 GraphicsLayer* layerForHorizontalScrollbar() const override; |
196 GraphicsLayer* layerForVerticalScrollbar() const override; | 196 GraphicsLayer* layerForVerticalScrollbar() const override; |
197 | 197 |
| 198 // Used for gathering data on user pinch-zoom statistics. |
| 199 void userDidChangeScale(); |
| 200 void sendUMAMetrics(); |
| 201 void startTrackingPinchStats(); |
| 202 |
198 private: | 203 private: |
199 explicit VisualViewport(FrameHost&); | 204 explicit VisualViewport(FrameHost&); |
200 | 205 |
201 bool visualViewportSuppliesScrollbars() const; | 206 bool visualViewportSuppliesScrollbars() const; |
202 | 207 |
203 // GraphicsLayerClient implementation. | 208 // GraphicsLayerClient implementation. |
204 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain
tingPhase, const IntRect& inClip) override; | 209 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain
tingPhase, const IntRect& inClip) override; |
205 String debugName(const GraphicsLayer*) override; | 210 String debugName(const GraphicsLayer*) override; |
206 | 211 |
207 void setupScrollbar(WebScrollbar::Orientation); | 212 void setupScrollbar(WebScrollbar::Orientation); |
(...skipping 16 matching lines...) Expand all Loading... |
224 OwnPtr<GraphicsLayer> m_overlayScrollbarHorizontal; | 229 OwnPtr<GraphicsLayer> m_overlayScrollbarHorizontal; |
225 OwnPtr<GraphicsLayer> m_overlayScrollbarVertical; | 230 OwnPtr<GraphicsLayer> m_overlayScrollbarVertical; |
226 OwnPtr<WebScrollbarLayer> m_webOverlayScrollbarHorizontal; | 231 OwnPtr<WebScrollbarLayer> m_webOverlayScrollbarHorizontal; |
227 OwnPtr<WebScrollbarLayer> m_webOverlayScrollbarVertical; | 232 OwnPtr<WebScrollbarLayer> m_webOverlayScrollbarVertical; |
228 | 233 |
229 // Offset of the visual viewport from the main frame's origin, in CSS pixels
. | 234 // Offset of the visual viewport from the main frame's origin, in CSS pixels
. |
230 FloatPoint m_offset; | 235 FloatPoint m_offset; |
231 float m_scale; | 236 float m_scale; |
232 IntSize m_size; | 237 IntSize m_size; |
233 float m_topControlsAdjustment; | 238 float m_topControlsAdjustment; |
| 239 float m_maxPageScale; |
| 240 bool m_trackPinchZoomStatsForPage; |
234 }; | 241 }; |
235 | 242 |
236 } // namespace blink | 243 } // namespace blink |
237 | 244 |
238 #endif // VisualViewport_h | 245 #endif // VisualViewport_h |
OLD | NEW |