OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_TOOLBAR_BROWSER_ACTION_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/extensions/extension_action_icon_factory.h" | 10 #include "chrome/browser/extensions/extension_action_icon_factory.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 virtual ~BrowserActionView(); | 67 virtual ~BrowserActionView(); |
68 | 68 |
69 BrowserActionButton* button() { return button_; } | 69 BrowserActionButton* button() { return button_; } |
70 | 70 |
71 // Gets browser action button icon with the badge. | 71 // Gets browser action button icon with the badge. |
72 gfx::ImageSkia GetIconWithBadge(); | 72 gfx::ImageSkia GetIconWithBadge(); |
73 | 73 |
74 // Overridden from views::View: | 74 // Overridden from views::View: |
75 virtual void Layout() OVERRIDE; | 75 virtual void Layout() OVERRIDE; |
76 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 76 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; |
77 virtual gfx::Size GetPreferredSize() OVERRIDE; | 77 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
78 | 78 |
79 protected: | 79 protected: |
80 // Overridden from views::View to paint the badge on top of children. | 80 // Overridden from views::View to paint the badge on top of children. |
81 virtual void PaintChildren(gfx::Canvas* canvas, | 81 virtual void PaintChildren(gfx::Canvas* canvas, |
82 const views::CullSet& cull_set) OVERRIDE; | 82 const views::CullSet& cull_set) OVERRIDE; |
83 | 83 |
84 private: | 84 private: |
85 // The Browser object this view is associated with. | 85 // The Browser object this view is associated with. |
86 Browser* browser_; | 86 Browser* browser_; |
87 | 87 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 // The observer that we need to notify when the icon of the button has been | 248 // The observer that we need to notify when the icon of the button has been |
249 // updated. | 249 // updated. |
250 IconObserver* icon_observer_; | 250 IconObserver* icon_observer_; |
251 | 251 |
252 friend class base::DeleteHelper<BrowserActionButton>; | 252 friend class base::DeleteHelper<BrowserActionButton>; |
253 | 253 |
254 DISALLOW_COPY_AND_ASSIGN(BrowserActionButton); | 254 DISALLOW_COPY_AND_ASSIGN(BrowserActionButton); |
255 }; | 255 }; |
256 | 256 |
257 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ | 257 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ |
OLD | NEW |