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 60% |
| copy from public/webpage/WebUserGestureToken.h |
| copy to Source/WebKit/chromium/src/PinchViewports.h |
| index 9506ef962e2617d3d1fb0c66e9cecb79eddef062..0b266e431738d7a9d86318d8c08818321206dc74 100644 |
| --- a/public/webpage/WebUserGestureToken.h |
| +++ b/Source/WebKit/chromium/src/PinchViewports.h |
| @@ -28,46 +28,52 @@ |
| * 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; |
|
jamesr
2013/06/14 20:55:46
specific using statements are strongly preferred i
wjmaclean
2013/06/17 17:45:27
Done.
|
| + |
| +class PinchViewports { |
| public: |
| - WebUserGestureToken() { } |
| - WebUserGestureToken(const WebUserGestureToken& other) { assign(other); } |
| - WebUserGestureToken& operator=(const WebUserGestureToken& other) |
| + static WTF::PassOwnPtr<PinchViewports> create(WebViewImpl* owner); |
|
jamesr
2013/06/14 20:55:46
no WTF:: needed - wtf/OwnPtr.h has a using stateme
wjmaclean
2013/06/17 17:45:27
Done.
|
| + ~PinchViewports(); |
| + |
| + void setOverflowControlsHostLayer(GraphicsLayer*); |
| + GraphicsLayer* rootGraphicsLayer() |
| { |
| - assign(other); |
| - return *this; |
| + return m_innerViewportClipLayer.get(); |
| } |
| - ~WebUserGestureToken() { reset(); } |
| - |
| - WEBKIT_EXPORT bool hasGestures() const; |
| - bool isNull() const { return m_token.isNull(); } |
| + void setViewportSize(const FloatSize&); |
| + void showGraphicsLayers(); |
| -#if WEBKIT_IMPLEMENTATION |
| - explicit WebUserGestureToken(PassRefPtr<WebCore::UserGestureToken>); |
| - operator PassRefPtr<WebCore::UserGestureToken>() const; |
| -#endif |
| +protected: |
| + PinchViewports(WebViewImpl* owner); |
|
jamesr
2013/06/14 20:55:46
explicit. why are all these protected and not priv
wjmaclean
2013/06/17 17:45:27
D'oh! I have no clue what I was thinking there!
D
|
| -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; |
|
jamesr
2013/06/14 20:55:46
no WTF::
wjmaclean
2013/06/17 17:45:27
Done.
|
| + WTF::OwnPtr<GraphicsLayer> m_pageScaleLayer; |
| + WTF::OwnPtr<GraphicsLayer> m_innerViewportScrollLayer; |
| + WTF::OwnPtr<GraphicsLayer> m_overlayScrollbarHorizontal; |
| + WTF::OwnPtr<GraphicsLayer> m_overlayScrollbarVertical; |
| }; |
| } // namespace WebKit |
| -#endif // WebUserGestureToken_h |
| +#endif // PinchViewports_h |