| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_TOUCH_TABS_TOUCH_TAB_STRIP_H_ | 5 #ifndef CHROME_BROWSER_UI_TOUCH_TABS_TOUCH_TAB_STRIP_H_ |
| 6 #define CHROME_BROWSER_UI_TOUCH_TABS_TOUCH_TAB_STRIP_H_ | 6 #define CHROME_BROWSER_UI_TOUCH_TABS_TOUCH_TAB_STRIP_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/ui/views/tabs/base_tab_strip.h" | 9 #include "chrome/browser/ui/views/tabs/base_tab_strip.h" |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // views::View overrides: | 59 // views::View overrides: |
| 60 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | 60 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
| 61 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; | 61 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; |
| 62 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; | 62 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; |
| 63 virtual void OnMouseCaptureLost() OVERRIDE; | 63 virtual void OnMouseCaptureLost() OVERRIDE; |
| 64 | 64 |
| 65 // Retrieves the Tab at the specified index. Remember, the specified index | 65 // Retrieves the Tab at the specified index. Remember, the specified index |
| 66 // is in terms of tab_data, *not* the model. | 66 // is in terms of tab_data, *not* the model. |
| 67 TouchTab* GetTabAtTabDataIndex(int tab_data_index) const; | 67 TouchTab* GetTabAtTabDataIndex(int tab_data_index) const; |
| 68 | 68 |
| 69 // Retrieves the Tab at the specified *model* index. |
| 70 TouchTab* GetTouchTabAtModelIndex(int model_index) const; |
| 71 |
| 69 private: | 72 private: |
| 70 void Init(); | 73 void Init(); |
| 71 | 74 |
| 72 // Overridden from views::View. | 75 // Overridden from views::View. |
| 73 virtual gfx::Size GetPreferredSize() OVERRIDE; | 76 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 74 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; | 77 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; |
| 75 virtual ui::TouchStatus OnTouchEvent(const views::TouchEvent& event) OVERRIDE; | 78 virtual ui::TouchStatus OnTouchEvent(const views::TouchEvent& event) OVERRIDE; |
| 76 virtual void ViewHierarchyChanged(bool is_add, | 79 virtual void ViewHierarchyChanged(bool is_add, |
| 77 View* parent, | 80 View* parent, |
| 78 View* child) OVERRIDE; | 81 View* child) OVERRIDE; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 TouchTab* initial_tab_; | 132 TouchTab* initial_tab_; |
| 130 | 133 |
| 131 // The minimum value that |scroll_offset_| can have. Based on the total | 134 // The minimum value that |scroll_offset_| can have. Based on the total |
| 132 // width of all the content to be scrolled, less the viewport size. | 135 // width of all the content to be scrolled, less the viewport size. |
| 133 int min_scroll_offset_; | 136 int min_scroll_offset_; |
| 134 | 137 |
| 135 DISALLOW_COPY_AND_ASSIGN(TouchTabStrip); | 138 DISALLOW_COPY_AND_ASSIGN(TouchTabStrip); |
| 136 }; | 139 }; |
| 137 | 140 |
| 138 #endif // CHROME_BROWSER_UI_TOUCH_TABS_TOUCH_TAB_STRIP_H_ | 141 #endif // CHROME_BROWSER_UI_TOUCH_TABS_TOUCH_TAB_STRIP_H_ |
| OLD | NEW |