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

Side by Side Diff: ash/common/wm/overview/cleanup_animation_observer.h

Issue 2736573002: chromeos: Move files in //ash/common to //ash, part 2 (Closed)
Patch Set: Created 3 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ASH_COMMON_WM_OVERVIEW_CLEANUP_ANIMATION_OBSERVER_H_
6 #define ASH_COMMON_WM_OVERVIEW_CLEANUP_ANIMATION_OBSERVER_H_
7
8 #include <memory>
9
10 #include "ash/ash_export.h"
11 #include "ash/common/wm/overview/window_selector_delegate.h"
12 #include "base/macros.h"
13 #include "ui/compositor/layer_animation_observer.h"
14
15 namespace views {
16 class Widget;
17 }
18
19 namespace ash {
20
21 // An observer which holds onto the passed widget until the animation is
22 // complete.
23 class ASH_EXPORT CleanupAnimationObserver
24 : public ui::ImplicitAnimationObserver,
25 public DelayedAnimationObserver {
26 public:
27 explicit CleanupAnimationObserver(std::unique_ptr<views::Widget> widget);
28 ~CleanupAnimationObserver() override;
29
30 // ui::ImplicitAnimationObserver:
31 // TODO(varkha): Look into all cases when animations are not started such as
32 // zero-duration animations and ensure that the object lifetime is handled.
33 void OnImplicitAnimationsCompleted() override;
34
35 // DelayedAnimationObserver:
36 void SetOwner(WindowSelectorDelegate* owner) override;
37 void Shutdown() override;
38
39 private:
40 std::unique_ptr<views::Widget> widget_;
41 WindowSelectorDelegate* owner_;
42
43 DISALLOW_COPY_AND_ASSIGN(CleanupAnimationObserver);
44 };
45
46 } // namespace ash
47
48 #endif // ASH_COMMON_WM_OVERVIEW_CLEANUP_ANIMATION_OBSERVER_H_
OLDNEW
« no previous file with comments | « ash/common/wm/mru_window_tracker_unittest.cc ('k') | ash/common/wm/overview/cleanup_animation_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698