Chromium Code Reviews| Index: Source/WebKit/chromium/src/PinchViewports.h |
| diff --git a/public/webpage/WebUserGestureToken.h b/Source/WebKit/chromium/src/PinchViewports.h |
| similarity index 56% |
| copy from public/webpage/WebUserGestureToken.h |
| copy to Source/WebKit/chromium/src/PinchViewports.h |
| index 9506ef962e2617d3d1fb0c66e9cecb79eddef062..769b5ba0f4d286cb50c96c12a42caad00766c4bf 100644 |
| --- a/public/webpage/WebUserGestureToken.h |
| +++ b/Source/WebKit/chromium/src/PinchViewports.h |
| @@ -28,46 +28,53 @@ |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| -#ifndef WebUserGestureToken_h |
| -#define WebUserGestureToken_h |
| +#ifndef PinchViewports_h |
| +#define PinchViewports_h |
| -#include "../platform/WebPrivatePtr.h" |
| +#include "core/platform/graphics/FloatSize.h" |
| +#include "public/platform/WebScrollbar.h" |
| +#include "public/platform/WebSize.h" |
| +#include "wtf/OwnPtr.h" |
| +#include "wtf/PassOwnPtr.h" |
| namespace WebCore { |
| -class UserGestureToken; |
| +class GraphicsLayer; |
| } |
| namespace WebKit { |
| -// A WebUserGestureToken allows for storing the user gesture state of the |
| -// currently active context and reinstantiating it later on to continue |
| -// processing the user gesture in case it was not consumed meanwhile. |
| -class WebUserGestureToken { |
| +class WebScrollbarLayer; |
| +class WebViewImpl; |
| + |
| +using namespace WebCore; |
| + |
| +class PinchViewports { |
| public: |
| - WebUserGestureToken() { } |
| - WebUserGestureToken(const WebUserGestureToken& other) { assign(other); } |
| - WebUserGestureToken& operator=(const WebUserGestureToken& other) |
| - { |
| - assign(other); |
| - return *this; |
| - } |
| - ~WebUserGestureToken() { reset(); } |
| + static WTF::PassOwnPtr<PinchViewports> create(WebViewImpl* owner); |
| + ~PinchViewports(); |
| + |
| + void setOverflowControlsHostLayer(GraphicsLayer*); |
| + GraphicsLayer* rootGraphicsLayer() { return m_innerViewportClipLayer.get(); } |
|
trchen
2013/06/13 21:11:54
nits: 80 chars
wjmaclean
2013/06/14 15:54:16
Done.
|
| + void setViewportSize(const FloatSize&); |
| + void showGraphicsLayers(); |
| - WEBKIT_EXPORT bool hasGestures() const; |
| - bool isNull() const { return m_token.isNull(); } |
| +protected: |
| + const static size_t kOverlayScrollbarThickness; |
|
trchen
2013/06/13 21:11:54
Should we make it a WebSettings?
wjmaclean
2013/06/14 15:54:16
Sure, seems reasonable.
|
| -#if WEBKIT_IMPLEMENTATION |
| - explicit WebUserGestureToken(PassRefPtr<WebCore::UserGestureToken>); |
| - operator PassRefPtr<WebCore::UserGestureToken>() const; |
| -#endif |
| + PinchViewports(WebViewImpl* owner); |
| -private: |
| - WEBKIT_EXPORT void assign(const WebUserGestureToken&); |
| - WEBKIT_EXPORT void reset(); |
| + void setupScrollbar(WebKit::WebScrollbar::Orientation); |
| - WebPrivatePtr<WebCore::UserGestureToken> m_token; |
| + WebViewImpl* m_owner; |
| + WTF::OwnPtr<GraphicsLayer> m_innerViewportClipLayer; |
| + WTF::OwnPtr<GraphicsLayer> m_pageScaleLayer; |
| + WTF::OwnPtr<GraphicsLayer> m_innerViewportScrollLayer; |
| + WTF::OwnPtr<GraphicsLayer> m_overlayScrollbarHorizontal; |
| + WTF::OwnPtr<GraphicsLayer> m_overlayScrollbarVertical; |
| + WTF::OwnPtr<WebScrollbarLayer> m_webScrollbarLayerHorizontal; |
| + WTF::OwnPtr<WebScrollbarLayer> m_webScrollbarLayerVertical; |
| }; |
| } // namespace WebKit |
| -#endif // WebUserGestureToken_h |
| +#endif // PinchViewports_h |