Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Unified Diff: Source/WebKit/chromium/src/PinchViewports.h

Issue 16799005: Insert pinch zoom virtual viewport layers to graphics layer tree. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/WebKit/chromium/src/PinchViewports.h
diff --git a/public/webpage/WebUserGestureToken.h b/Source/WebKit/chromium/src/PinchViewports.h
similarity index 58%
copy from public/webpage/WebUserGestureToken.h
copy to Source/WebKit/chromium/src/PinchViewports.h
index 9506ef962e2617d3d1fb0c66e9cecb79eddef062..c8ded15c5e22f66c394069d1cd637e0ef16d68af 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 "public/platform/WebScrollbar.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 setViewportSizes();
+ void clearLayers();
+ void insertViewportLayers();
+ void detachViewportLayers();
+ void reparentScrollbars();
+ void showGraphicsLayers();
- WEBKIT_EXPORT bool hasGestures() const;
- bool isNull() const { return m_token.isNull(); }
+protected:
+ const static size_t kOverlayScrollbarThickness;
-#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_innerViewportScrollLayer;
+ WTF::OwnPtr<GraphicsLayer> m_pageScaleLayer;
+ 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

Powered by Google App Engine
This is Rietveld 408576698