Chromium Code Reviews| Index: public/web/WebView.h |
| diff --git a/public/web/WebView.h b/public/web/WebView.h |
| index 7c9a0d1228f953201958385705f2c07530f8d730..8262ec3e31a9eb5e416750a637bc8053a957d199 100644 |
| --- a/public/web/WebView.h |
| +++ b/public/web/WebView.h |
| @@ -64,6 +64,7 @@ struct WebActiveWheelFlingParameters; |
| struct WebMediaPlayerAction; |
| struct WebPluginAction; |
| struct WebPoint; |
| +struct WebFloatPoint; |
| struct WebWindowFeatures; |
| class WebView : public WebWidget { |
| @@ -230,19 +231,37 @@ public: |
| // page scale set in the page's viewport meta tag. |
| virtual void setInitialPageScaleOverride(float) = 0; |
| + // TODO: Remove once all uses are converted to the "PinchViewport" methods below. |
| // Gets the scale factor of the page, where 1.0 is the normal size, > 1.0 |
| // is scaled up, < 1.0 is scaled down. |
| virtual float pageScaleFactor() const = 0; |
| - // Scales the page and the scroll offset by a given factor, while ensuring |
| - // that the new scroll position does not go beyond the edge of the page. |
| - virtual void setPageScaleFactorPreservingScrollOffset(float) = 0; |
| - |
| + // TODO: Remove once all uses are converted to the "PinchViewport" methods below. |
| // Scales a page by a factor of scaleFactor and then sets a scroll position to (x, y). |
| // setPageScaleFactor() magnifies and shrinks a page without affecting layout. |
| // On the other hand, zooming affects layout of the page. |
| virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) = 0; |
| + // TODO: Remove once all uses are converted to the "PinchViewport" methods below. |
| + // Temporary to keep old style pinch viewport working while we gradually bring up |
| + // virtual viewport pinch. |
| + virtual void setMainFrameScrollOffset(const WebPoint& origin) = 0; |
| + |
| + // Scales the page without affecting layout by using the pinch-to-zoom viewport. |
| + virtual void setPinchViewportScaleFactor(float) = 0; |
|
aelias_OOO_until_Jul13
2014/04/10 16:23:49
On second thought, I would suggest that you not ch
|
| + |
| + // Gets the scale factor set on the pinch-to-zoom viewport. |
| + virtual float pinchViewportScaleFactor() const = 0; |
| + |
| + // Sets the offset of the pinch-to-zoom viewport within the main frame, in |
| + // partial CSS pixels. The offset will be clamped so the pinch viewport |
| + // stays within the frame's bounds. |
| + virtual void setPinchViewportOffset(const WebFloatPoint&) = 0; |
| + |
| + // Gets the pinch viewport's current offset within the page's main frame, |
| + // in partial CSS pixels. |
| + virtual WebFloatPoint pinchViewportOffset() const = 0; |
| + |
| // PageScaleFactor will be force-clamped between minPageScale and maxPageScale |
| // (and these values will persist until setPageScaleFactorLimits is called |
| // again). |