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

Unified Diff: cc/pinch_zoom_scrollbar_geometry.h

Issue 11550035: Implement pinch-zoom scaling for main-frame scrollbars and pinch-zoom overlay scrollbars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to fix collision with solid colour scrollbars patch. Created 7 years, 9 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
« no previous file with comments | « cc/pinch_zoom_scrollbar.cc ('k') | cc/pinch_zoom_scrollbar_geometry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/pinch_zoom_scrollbar_geometry.h
diff --git a/cc/pinch_zoom_scrollbar_geometry.h b/cc/pinch_zoom_scrollbar_geometry.h
new file mode 100644
index 0000000000000000000000000000000000000000..d1ae9a512d66204a3f1f7f9b735cdcb520b42d48
--- /dev/null
+++ b/cc/pinch_zoom_scrollbar_geometry.h
@@ -0,0 +1,50 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_PINCH_ZOOM_SCROLLBAR_GEOMETRY_H_
+#define CC_PINCH_ZOOM_SCROLLBAR_GEOMETRY_H_
+
+#include "cc/cc_export.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbarThemeGeometry.h"
+
+using WebKit::WebScrollbar;
+using WebKit::WebRect;
+using WebKit::WebScrollbarThemeGeometry;
+
+namespace cc {
+
+class PinchZoomScrollbarGeometry : public WebScrollbarThemeGeometry {
+ public:
+ virtual ~PinchZoomScrollbarGeometry() {}
+
+ static const int kTrackWidth;
+
+ // Implement WebScrollbarThemeGeometry interface.
+ virtual WebScrollbarThemeGeometry* clone() const;
+ virtual int thumbPosition(WebScrollbar* scrollbar);
+ virtual int thumbLength(WebScrollbar* scrollbar);
+ virtual int trackPosition(WebScrollbar* scrollbar);
+ virtual int trackLength(WebScrollbar* scrollbar);
+ virtual bool hasButtons(WebScrollbar* scrollbar);
+ virtual bool hasThumb(WebScrollbar* scrollbar);
+ virtual WebRect trackRect(WebScrollbar* scrollbar);
+ virtual WebRect thumbRect(WebScrollbar* scrollbar);
+ virtual int minimumThumbLength(WebScrollbar* scrollbar);
+ virtual int scrollbarThickness(WebScrollbar* scrollbar);
+ virtual WebRect backButtonStartRect(WebScrollbar* scrollbar);
+ virtual WebRect backButtonEndRect(WebScrollbar* scrollbar);
+ virtual WebRect forwardButtonStartRect(WebScrollbar* scrollbar);
+ virtual WebRect forwardButtonEndRect(WebScrollbar* scrollbar);
+
+ virtual WebRect constrainTrackRectToTrackPieces(WebScrollbar* scrollbar,
+ const WebRect& trackRect);
+
+ virtual void splitTrack(
+ WebScrollbar* scrollbar, const WebRect& track, WebRect& start_track,
+ WebRect& thumb, WebRect& end_track);
+
+};
+
+} // namespace WebKit
+#endif // CC_PINCH_ZOOM_SCROLLBAR_GEOMETRY_H_
« no previous file with comments | « cc/pinch_zoom_scrollbar.cc ('k') | cc/pinch_zoom_scrollbar_geometry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698