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

Side by Side Diff: ash/common/wm/background_animator.h

Issue 2053113002: Replaced BackgroundAnimator with ShelfBackgroundAnimator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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_COMMON_WM_BACKGROUND_ANIMATOR_H_ 5 #ifndef ASH_COMMON_WM_BACKGROUND_ANIMATOR_H_
6 #define ASH_COMMON_WM_BACKGROUND_ANIMATOR_H_ 6 #define ASH_COMMON_WM_BACKGROUND_ANIMATOR_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "ui/gfx/animation/animation_delegate.h" 10 #include "ui/gfx/animation/animation_delegate.h"
11 #include "ui/gfx/animation/slide_animation.h" 11 #include "ui/gfx/animation/slide_animation.h"
12 12
13 namespace ash { 13 namespace ash {
14 14
15 // How the background can be changed. 15 // How the background can be changed.
16 enum BackgroundAnimatorChangeType { 16 enum BackgroundAnimatorChangeType {
17 BACKGROUND_CHANGE_ANIMATE, 17 BACKGROUND_CHANGE_ANIMATE,
18 BACKGROUND_CHANGE_IMMEDIATE 18 BACKGROUND_CHANGE_IMMEDIATE
19 }; 19 };
20 20
21 class BackgroundAnimator;
22
21 // Delegate is notified any time the background changes. 23 // Delegate is notified any time the background changes.
22 class ASH_EXPORT BackgroundAnimatorDelegate { 24 class ASH_EXPORT BackgroundAnimatorDelegate {
23 public: 25 public:
24 virtual void UpdateBackground(int alpha) = 0; 26 virtual void UpdateBackground(BackgroundAnimator* animator, int alpha) = 0;
27
28 virtual void BackgroundAnimationEnded(bool successfully) {}
James Cook 2016/06/09 23:40:37 nit: It feels a little weird that the other functi
bruthig 2016/06/14 16:40:44 Done. Agreed, this was a short cut to get it up fo
25 29
26 protected: 30 protected:
27 virtual ~BackgroundAnimatorDelegate() {} 31 virtual ~BackgroundAnimatorDelegate() {}
28 }; 32 };
29 33
30 // BackgroundAnimator is used by the shelf to animate the background (alpha). 34 // BackgroundAnimator is used by the shelf to animate the background (alpha).
31 class ASH_EXPORT BackgroundAnimator : public gfx::AnimationDelegate { 35 class ASH_EXPORT BackgroundAnimator : public gfx::AnimationDelegate {
32 public: 36 public:
33 BackgroundAnimator(BackgroundAnimatorDelegate* delegate, 37 BackgroundAnimator(BackgroundAnimatorDelegate* delegate,
34 int min_alpha, 38 int min_alpha,
(...skipping 28 matching lines...) Expand all
63 67
64 // Current alpha value of the background. 68 // Current alpha value of the background.
65 int alpha_; 69 int alpha_;
66 70
67 DISALLOW_COPY_AND_ASSIGN(BackgroundAnimator); 71 DISALLOW_COPY_AND_ASSIGN(BackgroundAnimator);
68 }; 72 };
69 73
70 } // namespace ash 74 } // namespace ash
71 75
72 #endif // ASH_COMMON_WM_BACKGROUND_ANIMATOR_H_ 76 #endif // ASH_COMMON_WM_BACKGROUND_ANIMATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698