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_VIEWS_TABS_TAB_STRIP_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/timer.h" | 10 #include "base/timer.h" |
11 #include "chrome/browser/ui/views/tabs/base_tab_strip.h" | 11 #include "chrome/browser/ui/views/tabs/base_tab_strip.h" |
12 #include "ui/base/animation/animation_container.h" | 12 #include "ui/base/animation/animation_container.h" |
13 #include "ui/gfx/point.h" | 13 #include "ui/gfx/point.h" |
14 #include "ui/gfx/rect.h" | 14 #include "ui/gfx/rect.h" |
15 #include "views/controls/button/image_button.h" | 15 #include "views/controls/button/image_button.h" |
16 #include "views/mouse_watcher.h" | 16 #include "views/mouse_watcher.h" |
17 | 17 |
18 class Tab; | 18 class Tab; |
| 19 class TabStripSelectionModel; |
19 | 20 |
20 namespace views { | 21 namespace views { |
21 class ImageView; | 22 class ImageView; |
22 } | 23 } |
23 | 24 |
24 /////////////////////////////////////////////////////////////////////////////// | 25 /////////////////////////////////////////////////////////////////////////////// |
25 // | 26 // |
26 // TabStrip | 27 // TabStrip |
27 // | 28 // |
28 // A View that represents the TabStripModel. The TabStrip has the | 29 // A View that represents the TabStripModel. The TabStrip has the |
(...skipping 21 matching lines...) Expand all Loading... |
50 // MouseWatcherListener overrides: | 51 // MouseWatcherListener overrides: |
51 virtual void MouseMovedOutOfView() OVERRIDE; | 52 virtual void MouseMovedOutOfView() OVERRIDE; |
52 | 53 |
53 // AbstractTabStripView implementation: | 54 // AbstractTabStripView implementation: |
54 virtual bool IsPositionInWindowCaption(const gfx::Point& point) OVERRIDE; | 55 virtual bool IsPositionInWindowCaption(const gfx::Point& point) OVERRIDE; |
55 virtual void SetBackgroundOffset(const gfx::Point& offset) OVERRIDE; | 56 virtual void SetBackgroundOffset(const gfx::Point& offset) OVERRIDE; |
56 | 57 |
57 // BaseTabStrip implementation: | 58 // BaseTabStrip implementation: |
58 virtual void PrepareForCloseAt(int model_index) OVERRIDE; | 59 virtual void PrepareForCloseAt(int model_index) OVERRIDE; |
59 virtual void RemoveTabAt(int model_index) OVERRIDE; | 60 virtual void RemoveTabAt(int model_index) OVERRIDE; |
60 virtual void SelectTabAt(int old_model_index, int new_model_index) OVERRIDE; | 61 virtual void SetSelection( |
| 62 const TabStripSelectionModel& old_selection, |
| 63 const TabStripSelectionModel& new_selection) OVERRIDE; |
61 virtual void TabTitleChangedNotLoading(int model_index) OVERRIDE; | 64 virtual void TabTitleChangedNotLoading(int model_index) OVERRIDE; |
62 virtual void StartHighlight(int model_index) OVERRIDE; | 65 virtual void StartHighlight(int model_index) OVERRIDE; |
63 virtual void StopAllHighlighting() OVERRIDE; | 66 virtual void StopAllHighlighting() OVERRIDE; |
64 virtual BaseTab* CreateTabForDragging() OVERRIDE; | 67 virtual BaseTab* CreateTabForDragging() OVERRIDE; |
65 | 68 |
66 // views::View overrides: | 69 // views::View overrides: |
67 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; | 70 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; |
68 virtual gfx::Size GetPreferredSize() OVERRIDE; | 71 virtual gfx::Size GetPreferredSize() OVERRIDE; |
69 // NOTE: the drag and drop methods are invoked from FrameView. This is done | 72 // NOTE: the drag and drop methods are invoked from FrameView. This is done |
70 // to allow for a drop region that extends outside the bounds of the TabStrip. | 73 // to allow for a drop region that extends outside the bounds of the TabStrip. |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 | 265 |
263 // Used for stage 1 of new tab animation. | 266 // Used for stage 1 of new tab animation. |
264 base::OneShotTimer<TabStrip> new_tab_timer_; | 267 base::OneShotTimer<TabStrip> new_tab_timer_; |
265 | 268 |
266 scoped_ptr<views::MouseWatcher> mouse_watcher_; | 269 scoped_ptr<views::MouseWatcher> mouse_watcher_; |
267 | 270 |
268 DISALLOW_COPY_AND_ASSIGN(TabStrip); | 271 DISALLOW_COPY_AND_ASSIGN(TabStrip); |
269 }; | 272 }; |
270 | 273 |
271 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ | 274 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ |
OLD | NEW |