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

Side by Side Diff: ash/shelf/background_animator.h

Issue 12313118: Refactor: Shelf Widget (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: safer shutdown (status_area_widget_) Created 7 years, 9 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
« no previous file with comments | « ash/screen_ash_unittest.cc ('k') | ash/shelf/background_animator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 ASH_LAUNCHER_BACKGROUND_ANIMATOR_H_ 5 #ifndef ASH_SHELF_BACKGROUND_ANIMATOR_H_
6 #define ASH_LAUNCHER_BACKGROUND_ANIMATOR_H_ 6 #define ASH_SHELF_BACKGROUND_ANIMATOR_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "ui/base/animation/animation_delegate.h" 10 #include "ui/base/animation/animation_delegate.h"
11 #include "ui/base/animation/slide_animation.h" 11 #include "ui/base/animation/slide_animation.h"
12 12
13 namespace ash { 13 namespace ash {
14 namespace internal { 14 namespace internal {
15 15
16 // Delegate is notified any time the background changes. 16 // Delegate is notified any time the background changes.
17 class ASH_EXPORT BackgroundAnimatorDelegate { 17 class ASH_EXPORT BackgroundAnimatorDelegate {
18 public: 18 public:
19 virtual void UpdateBackground(int alpha) = 0; 19 virtual void UpdateBackground(int alpha) = 0;
20 20
21 protected: 21 protected:
22 virtual ~BackgroundAnimatorDelegate() {} 22 virtual ~BackgroundAnimatorDelegate() {}
23 }; 23 };
24 24
25 // BackgroundAnimator is used by the launcher and system tray to animate the 25 // BackgroundAnimator is used by the shelf to animate the background (alpha).
26 // background (alpha).
27 class ASH_EXPORT BackgroundAnimator : public ui::AnimationDelegate { 26 class ASH_EXPORT BackgroundAnimator : public ui::AnimationDelegate {
28 public: 27 public:
29 // How the background can be changed. 28 // How the background can be changed.
30 enum ChangeType { 29 enum ChangeType {
31 CHANGE_ANIMATE, 30 CHANGE_ANIMATE,
32 CHANGE_IMMEDIATE 31 CHANGE_IMMEDIATE
33 }; 32 };
34 33
35 BackgroundAnimator(BackgroundAnimatorDelegate* delegate, 34 BackgroundAnimator(BackgroundAnimatorDelegate* delegate,
36 int min_alpha, 35 int min_alpha,
(...skipping 25 matching lines...) Expand all
62 61
63 // Current alpha value of the background. 62 // Current alpha value of the background.
64 int alpha_; 63 int alpha_;
65 64
66 DISALLOW_COPY_AND_ASSIGN(BackgroundAnimator); 65 DISALLOW_COPY_AND_ASSIGN(BackgroundAnimator);
67 }; 66 };
68 67
69 } // namespace internal 68 } // namespace internal
70 } // namespace ash 69 } // namespace ash
71 70
72 #endif // ASH_LAUNCHER_BACKGROUND_ANIMATOR_H_ 71 #endif // ASH_SHELF_BACKGROUND_ANIMATOR_H_
OLDNEW
« no previous file with comments | « ash/screen_ash_unittest.cc ('k') | ash/shelf/background_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698