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

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

Issue 2141133002: [ash-md] Animates overview shield in and out (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [ash-md] Completes shield opacity animation after overview closes (avoids crashes with delayed anim… Created 4 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_DELEGATE_H_ 5 #ifndef ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_DELEGATE_H_
6 #define ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_DELEGATE_H_ 6 #define ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_DELEGATE_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 10
11 namespace aura { 11 namespace ash {
12 class Window;
13 }
14 12
15 namespace ash { 13 class WindowSelectorDelegate;
14
15 class ASH_EXPORT DelayedAnimationObserver {
16 public:
17 virtual ~DelayedAnimationObserver() {}
18
19 // Sets a |delegate| that can be notified when |this| observer completes
20 // animation.
21 virtual void SetDelegate(WindowSelectorDelegate* delegate) = 0;
22
23 // Can be called by the |delegate| to delete the owned widget.
bruthig 2016/07/15 17:05:38 Is it true that if the owner of |this| calls shutd
varkha 2016/07/15 18:53:36 Done.
24 virtual void Shutdown() = 0;
25 };
16 26
17 // Implement this class to handle the selection event from WindowSelector. 27 // Implement this class to handle the selection event from WindowSelector.
18 class ASH_EXPORT WindowSelectorDelegate { 28 class ASH_EXPORT WindowSelectorDelegate {
19 public: 29 public:
20 // Invoked if selection is ended. 30 // Invoked if selection is ended.
21 virtual void OnSelectionEnded() = 0; 31 virtual void OnSelectionEnded() = 0;
22 32
33 // Passes ownership of |animation_observer| to |this| delegate.
34 virtual void AddDelayedAnimationObserver(
bruthig 2016/07/15 17:05:38 Instead of overloading the WindowSelectorDelegate,
varkha 2016/07/15 18:53:36 I like the last suggestion. Done.
35 std::unique_ptr<DelayedAnimationObserver> animation_observer) = 0;
36
37 // Finds and erases |animation_observer| from the list deleting the widget
38 // owned by the |animation_observer|.
39 virtual void RemoveDelayedAnimationObserver(
40 DelayedAnimationObserver* animation_observer) = 0;
41
23 protected: 42 protected:
24 virtual ~WindowSelectorDelegate() {} 43 virtual ~WindowSelectorDelegate() {}
25 }; 44 };
26 45
27 } // namespace ash 46 } // namespace ash
28 47
29 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_DELEGATE_H_ 48 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698