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

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

Issue 2734653002: chromeos: Move files in //ash/common to //ash (Closed)
Patch Set: fix a11y tests, fix docs 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 2013 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_WINDOW_SELECTOR_DELEGATE_H_
6 #define ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_DELEGATE_H_
7
8 #include "ash/ash_export.h"
9 #include "base/compiler_specific.h"
10
11 namespace ash {
12
13 class WindowSelectorDelegate;
14
15 class ASH_EXPORT DelayedAnimationObserver {
16 public:
17 virtual ~DelayedAnimationObserver() {}
18
19 // Sets an |owner| that can be notified when the animation that |this|
20 // observes completes.
21 virtual void SetOwner(WindowSelectorDelegate* owner) = 0;
22
23 // Can be called by the |owner| to delete the owned widget. The |owner| is
24 // then responsible for deleting |this| instance of the
25 // DelayedAnimationObserver.
26 virtual void Shutdown() = 0;
27 };
28
29 // Implement this class to handle the selection event from WindowSelector.
30 class ASH_EXPORT WindowSelectorDelegate {
31 public:
32 // Invoked if selection is ended.
33 virtual void OnSelectionEnded() = 0;
34
35 // Passes ownership of |animation_observer| to |this| delegate.
36 virtual void AddDelayedAnimationObserver(
37 std::unique_ptr<DelayedAnimationObserver> animation_observer) = 0;
38
39 // Finds and erases |animation_observer| from the list deleting the widget
40 // owned by the |animation_observer|.
41 // This method should be called when a scheduled animation completes.
42 // If the animation completion callback is a result of a window getting
43 // destroyed then the DelayedAnimationObserver::Shutdown() should be called
44 // first before destroying the window.
45 virtual void RemoveAndDestroyAnimationObserver(
46 DelayedAnimationObserver* animation_observer) = 0;
47
48 protected:
49 virtual ~WindowSelectorDelegate() {}
50 };
51
52 } // namespace ash
53
54 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_DELEGATE_H_
OLDNEW
« no previous file with comments | « ash/common/wm/overview/window_selector_controller.cc ('k') | ash/common/wm/overview/window_selector_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698