| 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_BROWSER_ACTION_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_BROWSER_ACTION_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_BROWSER_ACTION_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_BROWSER_ACTION_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/browser/extensions/image_loading_tracker.h" | 10 #include "chrome/browser/extensions/image_loading_tracker.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 public: | 149 public: |
| 150 BrowserActionView(const extensions::Extension* extension, | 150 BrowserActionView(const extensions::Extension* extension, |
| 151 BrowserActionsContainer* panel); | 151 BrowserActionsContainer* panel); |
| 152 virtual ~BrowserActionView(); | 152 virtual ~BrowserActionView(); |
| 153 | 153 |
| 154 BrowserActionButton* button() { return button_; } | 154 BrowserActionButton* button() { return button_; } |
| 155 | 155 |
| 156 // Allocates a canvas object on the heap and draws into it the icon for the | 156 // Allocates a canvas object on the heap and draws into it the icon for the |
| 157 // view as well as the badge (if any). Caller is responsible for deleting the | 157 // view as well as the badge (if any). Caller is responsible for deleting the |
| 158 // returned object. | 158 // returned object. |
| 159 gfx::Canvas* GetIconWithBadge(); | 159 gfx::ImageSkia GetIconWithBadge(); |
| 160 | 160 |
| 161 // Overridden from views::View: | 161 // Overridden from views::View: |
| 162 virtual void Layout() OVERRIDE; | 162 virtual void Layout() OVERRIDE; |
| 163 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 163 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
| 164 | 164 |
| 165 protected: | 165 protected: |
| 166 // Overridden from views::View to paint the badge on top of children. | 166 // Overridden from views::View to paint the badge on top of children. |
| 167 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; | 167 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; |
| 168 | 168 |
| 169 private: | 169 private: |
| 170 // The container for this view. | 170 // The container for this view. |
| 171 BrowserActionsContainer* panel_; | 171 BrowserActionsContainer* panel_; |
| 172 | 172 |
| 173 // The button this view contains. | 173 // The button this view contains. |
| 174 BrowserActionButton* button_; | 174 BrowserActionButton* button_; |
| 175 | 175 |
| 176 DISALLOW_COPY_AND_ASSIGN(BrowserActionView); | 176 DISALLOW_COPY_AND_ASSIGN(BrowserActionView); |
| 177 }; | 177 }; |
| 178 | 178 |
| 179 #endif // CHROME_BROWSER_UI_VIEWS_BROWSER_ACTION_VIEW_H_ | 179 #endif // CHROME_BROWSER_UI_VIEWS_BROWSER_ACTION_VIEW_H_ |
| OLD | NEW |