Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(784)

Side by Side Diff: chrome/browser/ui/views/browser_action_view.h

Issue 10827191: Convert extension action icons code to use ImageSkia instead of SkBitmap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698