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

Side by Side Diff: chrome/browser/ui/toolbar/wrench_icon_painter.h

Issue 23531053: ui/base/animation -> ui/gfx/animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge 2 trunk Created 7 years, 3 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_TOOLBAR_WRENCH_ICON_PAINTER_H_ 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_WRENCH_ICON_PAINTER_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_WRENCH_ICON_PAINTER_H_ 6 #define CHROME_BROWSER_UI_TOOLBAR_WRENCH_ICON_PAINTER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "chrome/browser/ui/global_error/global_error.h" 11 #include "chrome/browser/ui/global_error/global_error.h"
12 #include "chrome/browser/upgrade_detector.h" 12 #include "chrome/browser/upgrade_detector.h"
13 #include "ui/base/animation/animation_delegate.h" 13 #include "ui/gfx/animation/animation_delegate.h"
14 #include "ui/gfx/image/image_skia.h" 14 #include "ui/gfx/image/image_skia.h"
15 15
16 namespace gfx { 16 namespace gfx {
17 class Canvas; 17 class Canvas;
18 class MultiAnimation;
18 class Rect; 19 class Rect;
19 } 20 }
20 namespace ui { 21 namespace ui {
21 class MultiAnimation;
22 class ThemeProvider; 22 class ThemeProvider;
23 } 23 }
24 24
25 // This class is used to draw the wrench icon. It can signify severity levels 25 // This class is used to draw the wrench icon. It can signify severity levels
26 // by changing the wrench icon to different colors. 26 // by changing the wrench icon to different colors.
27 class WrenchIconPainter : ui::AnimationDelegate { 27 class WrenchIconPainter : gfx::AnimationDelegate {
28 public: 28 public:
29 enum BezelType { 29 enum BezelType {
30 BEZEL_NONE, 30 BEZEL_NONE,
31 BEZEL_HOVER, 31 BEZEL_HOVER,
32 BEZEL_PRESSED, 32 BEZEL_PRESSED,
33 }; 33 };
34 34
35 enum Severity { 35 enum Severity {
36 SEVERITY_NONE, 36 SEVERITY_NONE,
37 SEVERITY_LOW, 37 SEVERITY_LOW,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 void Paint(gfx::Canvas* canvas, 70 void Paint(gfx::Canvas* canvas,
71 ui::ThemeProvider* theme_provider, 71 ui::ThemeProvider* theme_provider,
72 const gfx::Rect& rect, 72 const gfx::Rect& rect,
73 BezelType bezel_type); 73 BezelType bezel_type);
74 74
75 private: 75 private:
76 FRIEND_TEST_ALL_PREFIXES(WrenchIconPainterTest, PaintCallback); 76 FRIEND_TEST_ALL_PREFIXES(WrenchIconPainterTest, PaintCallback);
77 77
78 // AnimationDelegate: 78 // AnimationDelegate:
79 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; 79 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
80 80
81 // Gets the image ID used to draw bars for the current severity level. 81 // Gets the image ID used to draw bars for the current severity level.
82 int GetCurrentSeverityImageID() const; 82 int GetCurrentSeverityImageID() const;
83 83
84 Delegate* delegate_; 84 Delegate* delegate_;
85 Severity severity_; 85 Severity severity_;
86 gfx::ImageSkia badge_; 86 gfx::ImageSkia badge_;
87 scoped_ptr<ui::MultiAnimation> animation_; 87 scoped_ptr<gfx::MultiAnimation> animation_;
88 88
89 DISALLOW_COPY_AND_ASSIGN(WrenchIconPainter); 89 DISALLOW_COPY_AND_ASSIGN(WrenchIconPainter);
90 }; 90 };
91 91
92 #endif // CHROME_BROWSER_UI_TOOLBAR_WRENCH_ICON_PAINTER_H_ 92 #endif // CHROME_BROWSER_UI_TOOLBAR_WRENCH_ICON_PAINTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/tabs/tab_audio_indicator_unittest.cc ('k') | chrome/browser/ui/toolbar/wrench_icon_painter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698