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

Unified Diff: chrome/browser/ui/touch/tabs/touch_tab_strip.h

Issue 6750007: Scrolling Tabs (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: self review 1 Created 9 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
Index: chrome/browser/ui/touch/tabs/touch_tab_strip.h
diff --git a/chrome/browser/ui/touch/tabs/touch_tab_strip.h b/chrome/browser/ui/touch/tabs/touch_tab_strip.h
index 1ba8b400d714fbd6c572db608c284a3797c6d418..5f453130660c8eba87d71769a5280bf5d888128e 100644
--- a/chrome/browser/ui/touch/tabs/touch_tab_strip.h
+++ b/chrome/browser/ui/touch/tabs/touch_tab_strip.h
@@ -48,6 +48,12 @@ class TouchTabStrip : public BaseTabStrip {
bool initial_drag);
virtual int GetSizeNeededForTabs(const std::vector<BaseTab*>& tabs);
+ // views::View overrides:
+ virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
+ virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE;
+ virtual void OnMouseReleased(const views::MouseEvent& event,
+ bool canceled) OVERRIDE;
+
// Retrieves the Tab at the specified index. Remember, the specified index
// is in terms of tab_data, *not* the model.
TouchTab* GetTabAtTabDataIndex(int tab_data_index) const;
@@ -63,6 +69,11 @@ class TouchTabStrip : public BaseTabStrip {
virtual void ViewHierarchyChanged(bool is_add,
View* parent,
View* child) OVERRIDE;
+ TouchTab* GetTabAtLocal(const gfx::Point& local_point);
sky 2011/03/25 21:05:25 Newline between 71 and 72 to make it clear this is
wyck 2011/03/28 14:21:43 Done.
+ void BeginScroll(const gfx::Point& point);
+ void ContinueScroll(const gfx::Point& point);
+ void EndScroll(const gfx::Point& point);
+ void ScrollTo(int delta_x);
// True if PrepareForCloseAt has been invoked. When true remove animations
// preserve current tab bounds.
@@ -74,6 +85,13 @@ class TouchTabStrip : public BaseTabStrip {
// The view that was tapped last.
View* last_tapped_view_;
+ int initial_mouse_x_;
+ int initial_scroll_offset_;
+ int scroll_offset_;
+ bool scrolling_;
+ TouchTab* initial_tab_;
+ int min_scroll_offset_;
+
DISALLOW_COPY_AND_ASSIGN(TouchTabStrip);
};

Powered by Google App Engine
This is Rietveld 408576698