| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 60 // The vertical offset of the tab strip button. This offset applies only to |
| 61 // restored windows. | 61 // restored windows. |
| 62 static const int kNewTabButtonVerticalOffset; | 62 static const int kNewTabButtonVerticalOffset; |
| 63 | 63 |
| 64 // The size of the new tab button must be hardcoded because we need to be | |
| 65 // able to lay it out before we are able to get its image from the | |
| 66 // ui::ThemeProvider. It also makes sense to do this, because the size of the | |
| 67 // new tab button should not need to be calculated dynamically. | |
| 68 static const int kNewTabButtonAssetWidth; | |
| 69 | |
| 70 explicit TabStrip(TabStripController* controller); | 64 explicit TabStrip(TabStripController* controller); |
| 71 ~TabStrip() override; | 65 ~TabStrip() override; |
| 72 | 66 |
| 73 // Add and remove observers to changes within this TabStrip. | 67 // Add and remove observers to changes within this TabStrip. |
| 74 void AddObserver(TabStripObserver* observer); | 68 void AddObserver(TabStripObserver* observer); |
| 75 void RemoveObserver(TabStripObserver* observer); | 69 void RemoveObserver(TabStripObserver* observer); |
| 76 | 70 |
| 77 // If |adjust_layout| is true the stacked layout changes based on whether the | 71 // If |adjust_layout| is true the stacked layout changes based on whether the |
| 78 // user uses a mouse or a touch device with the tabstrip. | 72 // user uses a mouse or a touch device with the tabstrip. |
| 79 void set_adjust_layout(bool adjust_layout) { adjust_layout_ = adjust_layout; } | 73 void set_adjust_layout(bool adjust_layout) { adjust_layout_ = adjust_layout; } |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 bool immersive_style_; | 639 bool immersive_style_; |
| 646 | 640 |
| 647 // Our observers. | 641 // Our observers. |
| 648 typedef base::ObserverList<TabStripObserver> TabStripObservers; | 642 typedef base::ObserverList<TabStripObserver> TabStripObservers; |
| 649 TabStripObservers observers_; | 643 TabStripObservers observers_; |
| 650 | 644 |
| 651 DISALLOW_COPY_AND_ASSIGN(TabStrip); | 645 DISALLOW_COPY_AND_ASSIGN(TabStrip); |
| 652 }; | 646 }; |
| 653 | 647 |
| 654 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ | 648 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ |
| OLD | NEW |