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

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

Issue 259004: First cut at badge implementation. Right now it just uses static (Closed)
Patch Set: cleanup Created 11 years, 2 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_PANEL_H_ 5 #ifndef CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_PANEL_H_
6 #define CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_PANEL_H_ 6 #define CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_PANEL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "chrome/common/notification_observer.h" 10 #include "chrome/common/notification_observer.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // Overridden from views::View: 48 // Overridden from views::View:
49 virtual gfx::Size GetPreferredSize(); 49 virtual gfx::Size GetPreferredSize();
50 virtual void Layout(); 50 virtual void Layout();
51 51
52 // Overridden from NotificationObserver: 52 // Overridden from NotificationObserver:
53 virtual void Observe(NotificationType type, 53 virtual void Observe(NotificationType type,
54 const NotificationSource& source, 54 const NotificationSource& source,
55 const NotificationDetails& details); 55 const NotificationDetails& details);
56 56
57 private: 57 private:
58 // We override PaintChildren so that we can paint the badges on top of them.
59 virtual void PaintChildren(gfx::Canvas* canvas);
60
61 // Paints an individual badge.
62 virtual void PaintBadge(gfx::Canvas* canvas, views::TextButton* button,
63 const SkColor& badge_color,
64 const std::string& text);
65
58 // The vector of browser actions (icons/image buttons for each action). 66 // The vector of browser actions (icons/image buttons for each action).
59 std::vector<views::TextButton*> browser_action_views_; 67 std::vector<views::TextButton*> browser_action_views_;
60 68
61 NotificationRegistrar registrar_; 69 NotificationRegistrar registrar_;
62 70
63 Profile* profile_; 71 Profile* profile_;
64 72
65 // The toolbar that owns us. 73 // The toolbar that owns us.
66 ToolbarView* toolbar_; 74 ToolbarView* toolbar_;
67 75
68 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); 76 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer);
69 }; 77 };
70 78
71 #endif // CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_PANEL_H_ 79 #endif // CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_PANEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698