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

Side by Side Diff: chrome/browser/ui/views/toolbar/wrench_toolbar_button.h

Issue 298813002: views: Move MenuButton from TextButton to LabelButton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable DragDirectlyToSecondWindow. Created 6 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 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_WRENCH_TOOLBAR_BUTTON_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_WRENCH_TOOLBAR_BUTTON_H_
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_WRENCH_TOOLBAR_BUTTON_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_WRENCH_TOOLBAR_BUTTON_H_
7 7
8 #include "chrome/browser/ui/toolbar/wrench_icon_painter.h" 8 #include "chrome/browser/ui/toolbar/wrench_icon_painter.h"
9 #include "ui/views/controls/button/menu_button.h" 9 #include "ui/views/controls/button/menu_button.h"
10 10
11 // TODO(gbillock): Rename this? No longer a wrench. 11 // TODO(gbillock): Rename this? No longer a wrench.
12 class WrenchToolbarButton : public views::MenuButton, 12 class WrenchToolbarButton : public views::MenuButton,
13 public WrenchIconPainter::Delegate { 13 public WrenchIconPainter::Delegate {
14 public: 14 public:
15 explicit WrenchToolbarButton(views::MenuButtonListener* menu_button_listener); 15 explicit WrenchToolbarButton(views::MenuButtonListener* menu_button_listener);
16 virtual ~WrenchToolbarButton(); 16 virtual ~WrenchToolbarButton();
17 17
18 void SetSeverity(WrenchIconPainter::Severity severity, bool animate); 18 void SetSeverity(WrenchIconPainter::Severity severity, bool animate);
19 19
20 private:
21 // views::MenuButton: 20 // views::MenuButton:
21 virtual gfx::Size GetPreferredSize() const OVERRIDE;
22 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 22 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
23 23
24 // WrenchIconPainter::Delegate: 24 // WrenchIconPainter::Delegate:
25 virtual void ScheduleWrenchIconPaint() OVERRIDE; 25 virtual void ScheduleWrenchIconPaint() OVERRIDE;
26 26
27 private:
27 WrenchIconPainter::BezelType GetCurrentBezelType() const; 28 WrenchIconPainter::BezelType GetCurrentBezelType() const;
28 29
29 scoped_ptr<WrenchIconPainter> wrench_icon_painter_; 30 scoped_ptr<WrenchIconPainter> wrench_icon_painter_;
30 31
31 DISALLOW_COPY_AND_ASSIGN(WrenchToolbarButton); 32 DISALLOW_COPY_AND_ASSIGN(WrenchToolbarButton);
32 }; 33 };
33 34
34 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_WRENCH_TOOLBAR_BUTTON_H_ 35 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_WRENCH_TOOLBAR_BUTTON_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/browser_actions_container.cc ('k') | chrome/browser/ui/views/toolbar/wrench_toolbar_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698