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_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_ |
6 #define CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_ | 6 #define CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "views/controls/button/menu_button.h" | 10 #include "views/controls/button/menu_button.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 // Different text styles for different types of backgrounds. | 21 // Different text styles for different types of backgrounds. |
22 enum TextStyle { | 22 enum TextStyle { |
23 WHITE_PLAIN, | 23 WHITE_PLAIN, |
24 GRAY_PLAIN, | 24 GRAY_PLAIN, |
25 WHITE_HALOED, | 25 WHITE_HALOED, |
26 GRAY_EMBOSSED | 26 GRAY_EMBOSSED |
27 }; | 27 }; |
28 | 28 |
29 class Delegate { | 29 class Delegate { |
30 public: | 30 public: |
| 31 // Commands to be passed to ExecuteCommand(). |
| 32 enum Command { |
| 33 SHOW_LANGUAGE_OPTIONS, |
| 34 SHOW_NETWORK_OPTIONS, |
| 35 SHOW_SYSTEM_OPTIONS |
| 36 }; |
| 37 |
31 // |command_id| can be any int, passed from the button to the delegate. | 38 // |command_id| can be any int, passed from the button to the delegate. |
32 virtual bool ShouldExecuteStatusAreaCommand( | 39 virtual bool ShouldExecuteStatusAreaCommand( |
33 const views::View* button_view, int command_id) const = 0; | 40 const views::View* button_view, int command_id) const = 0; |
34 | 41 |
35 virtual void ExecuteStatusAreaCommand( | 42 virtual void ExecuteStatusAreaCommand( |
36 const views::View* button_view, int command_id) = 0; | 43 const views::View* button_view, int command_id) = 0; |
37 | 44 |
38 // Return the button font. |font| is set to the default button font. | 45 // Return the button font. |font| is set to the default button font. |
39 virtual gfx::Font GetStatusAreaFont(const gfx::Font& font) const = 0; | 46 virtual gfx::Font GetStatusAreaFont(const gfx::Font& font) const = 0; |
40 | 47 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 98 |
92 private: | 99 private: |
93 void UpdateTextStyle(); | 100 void UpdateTextStyle(); |
94 | 101 |
95 Delegate* delegate_; | 102 Delegate* delegate_; |
96 | 103 |
97 DISALLOW_COPY_AND_ASSIGN(StatusAreaButton); | 104 DISALLOW_COPY_AND_ASSIGN(StatusAreaButton); |
98 }; | 105 }; |
99 | 106 |
100 #endif // CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_ | 107 #endif // CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_ |
OLD | NEW |