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 |
| 203 // Heuristic-based function for determining if we should disable workarounds |
| 204 // for viewing websites that are not optimized for mobile devices. |
| 205 bool shouldDisableDesktopWorkarounds() const; |
| 206 |
198 private: | 207 private: |
199 explicit VisualViewport(FrameHost&); | 208 explicit VisualViewport(FrameHost&); |
200 | 209 |
201 bool visualViewportSuppliesScrollbars() const; | 210 bool visualViewportSuppliesScrollbars() const; |
202 | 211 |
203 // GraphicsLayerClient implementation. | 212 // GraphicsLayerClient implementation. |
204 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain
tingPhase, const IntRect& inClip) const override; | 213 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain
tingPhase, const IntRect& inClip) const override; |
205 String debugName(const GraphicsLayer*) override; | 214 String debugName(const GraphicsLayer*) override; |
206 | 215 |
207 void setupScrollbar(WebScrollbar::Orientation); | 216 void setupScrollbar(WebScrollbar::Orientation); |
(...skipping 16 matching lines...) Expand all Loading... |
224 OwnPtr<GraphicsLayer> m_overlayScrollbarHorizontal; | 233 OwnPtr<GraphicsLayer> m_overlayScrollbarHorizontal; |
225 OwnPtr<GraphicsLayer> m_overlayScrollbarVertical; | 234 OwnPtr<GraphicsLayer> m_overlayScrollbarVertical; |
226 OwnPtr<WebScrollbarLayer> m_webOverlayScrollbarHorizontal; | 235 OwnPtr<WebScrollbarLayer> m_webOverlayScrollbarHorizontal; |
227 OwnPtr<WebScrollbarLayer> m_webOverlayScrollbarVertical; | 236 OwnPtr<WebScrollbarLayer> m_webOverlayScrollbarVertical; |
228 | 237 |
229 // Offset of the visual viewport from the main frame's origin, in CSS pixels
. | 238 // Offset of the visual viewport from the main frame's origin, in CSS pixels
. |
230 FloatPoint m_offset; | 239 FloatPoint m_offset; |
231 float m_scale; | 240 float m_scale; |
232 IntSize m_size; | 241 IntSize m_size; |
233 float m_topControlsAdjustment; | 242 float m_topControlsAdjustment; |
| 243 float m_maxPageScale; |
| 244 bool m_trackPinchZoomStatsForPage; |
234 }; | 245 }; |
235 | 246 |
236 } // namespace blink | 247 } // namespace blink |
237 | 248 |
238 #endif // VisualViewport_h | 249 #endif // VisualViewport_h |
OLD | NEW |