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_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/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // Handle visibility changes (e.g. resize the status area). | 47 // Handle visibility changes (e.g. resize the status area). |
48 virtual void ButtonVisibilityChanged(views::View* button_view) = 0; | 48 virtual void ButtonVisibilityChanged(views::View* button_view) = 0; |
49 | 49 |
50 protected: | 50 protected: |
51 virtual ~Delegate() {} | 51 virtual ~Delegate() {} |
52 }; | 52 }; |
53 | 53 |
54 StatusAreaButton(Delegate* button_delegate, | 54 StatusAreaButton(Delegate* button_delegate, |
55 views::ViewMenuDelegate* menu_delegate); | 55 views::ViewMenuDelegate* menu_delegate); |
56 virtual ~StatusAreaButton() {} | 56 virtual ~StatusAreaButton() {} |
57 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) OVERRIDE; | 57 virtual void PaintButton(gfx::CanvasSkia* canvas, |
| 58 PaintButtonMode mode) OVERRIDE; |
58 | 59 |
59 // Overrides TextButton's SetText to clear max text size before seting new | 60 // Overrides TextButton's SetText to clear max text size before seting new |
60 // text content so that the button size would fit the new text size. | 61 // text content so that the button size would fit the new text size. |
61 virtual void SetText(const string16& text) OVERRIDE; | 62 virtual void SetText(const string16& text) OVERRIDE; |
62 | 63 |
63 // views::MenuButton overrides. | 64 // views::MenuButton overrides. |
64 virtual bool Activate() OVERRIDE; | 65 virtual bool Activate() OVERRIDE; |
65 | 66 |
66 // View overrides. | 67 // View overrides. |
67 virtual gfx::Size GetPreferredSize() OVERRIDE; | 68 virtual gfx::Size GetPreferredSize() OVERRIDE; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 Delegate* delegate_; | 104 Delegate* delegate_; |
104 | 105 |
105 // Fonts used to render the button's text. | 106 // Fonts used to render the button's text. |
106 gfx::Font light_font_; | 107 gfx::Font light_font_; |
107 gfx::Font bold_font_; | 108 gfx::Font bold_font_; |
108 | 109 |
109 DISALLOW_COPY_AND_ASSIGN(StatusAreaButton); | 110 DISALLOW_COPY_AND_ASSIGN(StatusAreaButton); |
110 }; | 111 }; |
111 | 112 |
112 #endif // CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_ | 113 #endif // CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_ |
OLD | NEW |