OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // DraggedTab, focusing on tasks that require reshuffling other tabs | 50 // DraggedTab, focusing on tasks that require reshuffling other tabs |
51 // in response to dragged tabs. | 51 // in response to dragged tabs. |
52 // | 52 // |
53 /////////////////////////////////////////////////////////////////////////////// | 53 /////////////////////////////////////////////////////////////////////////////// |
54 class TabStrip : public views::View, | 54 class TabStrip : public views::View, |
55 public views::ButtonListener, | 55 public views::ButtonListener, |
56 public views::MouseWatcherListener, | 56 public views::MouseWatcherListener, |
57 public views::ViewTargeterDelegate, | 57 public views::ViewTargeterDelegate, |
58 public TabController { | 58 public TabController { |
59 public: | 59 public: |
60 // The vertical offset of the tab strip button. This offset applies only to | |
61 // restored windows. | |
62 static const int kNewTabButtonVerticalOffset; | |
63 | |
64 explicit TabStrip(TabStripController* controller); | 60 explicit TabStrip(TabStripController* controller); |
65 ~TabStrip() override; | 61 ~TabStrip() override; |
66 | 62 |
67 // Add and remove observers to changes within this TabStrip. | 63 // Add and remove observers to changes within this TabStrip. |
68 void AddObserver(TabStripObserver* observer); | 64 void AddObserver(TabStripObserver* observer); |
69 void RemoveObserver(TabStripObserver* observer); | 65 void RemoveObserver(TabStripObserver* observer); |
70 | 66 |
71 // If |adjust_layout| is true the stacked layout changes based on whether the | 67 // If |adjust_layout| is true the stacked layout changes based on whether the |
72 // user uses a mouse or a touch device with the tabstrip. | 68 // user uses a mouse or a touch device with the tabstrip. |
73 void set_adjust_layout(bool adjust_layout) { adjust_layout_ = adjust_layout; } | 69 void set_adjust_layout(bool adjust_layout) { adjust_layout_ = adjust_layout; } |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 bool immersive_style_; | 647 bool immersive_style_; |
652 | 648 |
653 // Our observers. | 649 // Our observers. |
654 typedef base::ObserverList<TabStripObserver> TabStripObservers; | 650 typedef base::ObserverList<TabStripObserver> TabStripObservers; |
655 TabStripObservers observers_; | 651 TabStripObservers observers_; |
656 | 652 |
657 DISALLOW_COPY_AND_ASSIGN(TabStrip); | 653 DISALLOW_COPY_AND_ASSIGN(TabStrip); |
658 }; | 654 }; |
659 | 655 |
660 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ | 656 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ |
OLD | NEW |