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

Side by Side Diff: chrome/browser/views/browser_actions_container.h

Issue 2862025: Canvas refactoring part 2.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 6 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ 5 #ifndef CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_CONTAINER_H_
6 #define CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ 6 #define CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_CONTAINER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 16 matching lines...) Expand all
27 class Browser; 27 class Browser;
28 class BrowserActionsContainer; 28 class BrowserActionsContainer;
29 class BrowserActionOverflowMenuController; 29 class BrowserActionOverflowMenuController;
30 class BrowserActionsContainer; 30 class BrowserActionsContainer;
31 class Extension; 31 class Extension;
32 class ExtensionAction; 32 class ExtensionAction;
33 class ExtensionPopup; 33 class ExtensionPopup;
34 class PrefService; 34 class PrefService;
35 class Profile; 35 class Profile;
36 36
37 namespace gfx {
38 class CanvasSkia;
39 }
40
37 namespace views { 41 namespace views {
38 class Menu2; 42 class Menu2;
39 } 43 }
40 44
41 //////////////////////////////////////////////////////////////////////////////// 45 ////////////////////////////////////////////////////////////////////////////////
42 // BrowserActionButton 46 // BrowserActionButton
43 47
44 // The BrowserActionButton is a specialization of the MenuButton class. 48 // The BrowserActionButton is a specialization of the MenuButton class.
45 // It acts on a ExtensionAction, in this case a BrowserAction and handles 49 // It acts on a ExtensionAction, in this case a BrowserAction and handles
46 // loading the image for the button asynchronously on the file thread. 50 // loading the image for the button asynchronously on the file thread.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 class BrowserActionView : public views::View { 147 class BrowserActionView : public views::View {
144 public: 148 public:
145 BrowserActionView(Extension* extension, BrowserActionsContainer* panel); 149 BrowserActionView(Extension* extension, BrowserActionsContainer* panel);
146 virtual ~BrowserActionView(); 150 virtual ~BrowserActionView();
147 151
148 BrowserActionButton* button() { return button_; } 152 BrowserActionButton* button() { return button_; }
149 153
150 // Allocates a canvas object on the heap and draws into it the icon for the 154 // Allocates a canvas object on the heap and draws into it the icon for the
151 // view as well as the badge (if any). Caller is responsible for deleting the 155 // view as well as the badge (if any). Caller is responsible for deleting the
152 // returned object. 156 // returned object.
153 gfx::Canvas* GetIconWithBadge(); 157 gfx::CanvasSkia* GetIconWithBadge();
154 158
155 // Accessibility accessors, overridden from View. 159 // Accessibility accessors, overridden from View.
156 virtual bool GetAccessibleRole(AccessibilityTypes::Role* role); 160 virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
157 161
158 private: 162 private:
159 virtual void Layout(); 163 virtual void Layout();
160 164
161 // Override PaintChildren so that we can paint the badge on top of children. 165 // Override PaintChildren so that we can paint the badge on top of children.
162 virtual void PaintChildren(gfx::Canvas* canvas); 166 virtual void PaintChildren(gfx::Canvas* canvas);
163 167
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 499
496 ScopedRunnableMethodFactory<BrowserActionsContainer> task_factory_; 500 ScopedRunnableMethodFactory<BrowserActionsContainer> task_factory_;
497 501
498 // Handles delayed showing of the overflow menu when hovering. 502 // Handles delayed showing of the overflow menu when hovering.
499 ScopedRunnableMethodFactory<BrowserActionsContainer> show_menu_task_factory_; 503 ScopedRunnableMethodFactory<BrowserActionsContainer> show_menu_task_factory_;
500 504
501 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); 505 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer);
502 }; 506 };
503 507
504 #endif // CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ 508 #endif // CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_CONTAINER_H_
OLDNEW
« no previous file with comments | « chrome/browser/views/bookmark_bar_view.cc ('k') | chrome/browser/views/browser_actions_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698