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

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

Issue 14245003: Wrench Icon: Only animate low severity status once (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_WRENCH_TOOLBAR_BUTTON_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_WRENCH_TOOLBAR_BUTTON_H_
6 #define CHROME_BROWSER_UI_VIEWS_WRENCH_TOOLBAR_BUTTON_H_ 6 #define CHROME_BROWSER_UI_VIEWS_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 class WrenchToolbarButton : public views::MenuButton, 11 class WrenchToolbarButton : public views::MenuButton,
12 public WrenchIconPainter::Delegate { 12 public WrenchIconPainter::Delegate {
13 public: 13 public:
14 explicit WrenchToolbarButton(views::MenuButtonListener* menu_button_listener); 14 explicit WrenchToolbarButton(views::MenuButtonListener* menu_button_listener);
15 virtual ~WrenchToolbarButton(); 15 virtual ~WrenchToolbarButton();
16 16
17 void SetSeverity(WrenchIconPainter::Severity severity); 17 void SetSeverity(WrenchIconPainter::Severity severity, bool animate);
18 18
19 private: 19 private:
20 // views::MenuButton: 20 // views::MenuButton:
21 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 21 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
22 22
23 // WrenchIconPainter::Delegate: 23 // WrenchIconPainter::Delegate:
24 virtual void ScheduleWrenchIconPaint() OVERRIDE; 24 virtual void ScheduleWrenchIconPaint() OVERRIDE;
25 25
26 WrenchIconPainter::BezelType GetCurrentBezelType() const; 26 WrenchIconPainter::BezelType GetCurrentBezelType() const;
27 27
28 scoped_ptr<WrenchIconPainter> wrench_icon_painter_; 28 scoped_ptr<WrenchIconPainter> wrench_icon_painter_;
29 29
30 DISALLOW_COPY_AND_ASSIGN(WrenchToolbarButton); 30 DISALLOW_COPY_AND_ASSIGN(WrenchToolbarButton);
31 }; 31 };
32 32
33 #endif // CHROME_BROWSER_UI_VIEWS_WRENCH_TOOLBAR_BUTTON_H_ 33 #endif // CHROME_BROWSER_UI_VIEWS_WRENCH_TOOLBAR_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698