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_AURA_MULTIPLE_WINDOW_INDICATOR_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_ASH_MULTIPLE_WINDOW_INDICATOR_BUTTON_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_AURA_MULTIPLE_WINDOW_INDICATOR_BUTTON_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_ASH_MULTIPLE_WINDOW_INDICATOR_BUTTON_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "chrome/browser/chromeos/status/status_area_button.h" | 10 #include "chrome/browser/chromeos/status/status_area_button.h" |
11 #include "chrome/browser/ui/browser_list.h" | 11 #include "chrome/browser/ui/browser_list.h" |
12 | 12 |
13 // A multiple window indicator that shows up on the right side of the status | 13 // A multiple window indicator that shows up on the right side of the status |
14 // area when you have more than one tabbed browser window open. | 14 // area when you have more than one tabbed browser window open. |
15 class MultipleWindowIndicatorButton : public StatusAreaButton, | 15 class MultipleWindowIndicatorButton : public StatusAreaButton, |
16 public BrowserList::Observer { | 16 public BrowserList::Observer { |
17 public: | 17 public: |
18 explicit MultipleWindowIndicatorButton(StatusAreaButton::Delegate* delegate); | 18 explicit MultipleWindowIndicatorButton(StatusAreaButton::Delegate* delegate); |
19 virtual ~MultipleWindowIndicatorButton(); | 19 virtual ~MultipleWindowIndicatorButton(); |
20 | 20 |
21 private: | 21 private: |
22 // BrowserList::Observer implementation: | 22 // BrowserList::Observer implementation: |
23 virtual void OnBrowserAdded(const Browser* browser) OVERRIDE; | 23 virtual void OnBrowserAdded(const Browser* browser) OVERRIDE; |
24 virtual void OnBrowserRemoved(const Browser* browser) OVERRIDE; | 24 virtual void OnBrowserRemoved(const Browser* browser) OVERRIDE; |
25 | 25 |
26 // Update this button's visibility based on number of tabbed browser windows. | 26 // Update this button's visibility based on number of tabbed browser windows. |
27 // That is, show the button when there are more than one tabbed browser and | 27 // That is, show the button when there are more than one tabbed browser and |
28 // hide otherwise. | 28 // hide otherwise. |
29 void UpdateVisiblity(); | 29 void UpdateVisiblity(); |
30 | 30 |
31 DISALLOW_COPY_AND_ASSIGN(MultipleWindowIndicatorButton); | 31 DISALLOW_COPY_AND_ASSIGN(MultipleWindowIndicatorButton); |
32 }; | 32 }; |
33 | 33 |
34 #endif // CHROME_BROWSER_UI_VIEWS_AURA_MULTIPLE_WINDOW_INDICATOR_BUTTON_H_ | 34 #endif // CHROME_BROWSER_UI_VIEWS_ASH_MULTIPLE_WINDOW_INDICATOR_BUTTON_H_ |
OLD | NEW |