OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ATHENA_WM_WINDOW_OVERVIEW_MODE_H_ | 5 #ifndef ATHENA_WM_WINDOW_OVERVIEW_MODE_H_ |
6 #define ATHENA_WM_WINDOW_OVERVIEW_MODE_H_ | 6 #define ATHENA_WM_WINDOW_OVERVIEW_MODE_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
10 | 10 |
11 namespace athena { | 11 namespace athena { |
12 class SplitViewController; | 12 class SplitViewController; |
13 class WindowListProvider; | 13 class WindowListProvider; |
14 | 14 |
15 class WindowOverviewModeDelegate { | 15 class WindowOverviewModeDelegate { |
16 public: | 16 public: |
17 enum SplitType { | |
18 SPLIT_NONE, | |
19 SPLIT_LEFT, | |
20 SPLIT_RIGHT | |
21 }; | |
22 | |
17 virtual ~WindowOverviewModeDelegate() {} | 23 virtual ~WindowOverviewModeDelegate() {} |
18 | 24 |
19 virtual void OnSelectWindow(aura::Window* window) = 0; | 25 // Called when a window is selected in overview mode. |window| is the window |
20 | 26 // to be activated. |window| is NULL if there are no windows in overview mode. |
21 // Gets into split-view mode with |left| on the left-side of the screen, and | 27 // |split_type| indicates whether the window should be part |
22 // |right| on the right-side. If |left| or |right| is NULL, then the delegate | 28 // of split view and what position it should have in split view. The method |
23 // selects the best option in its place. | 29 // should update |window|'s bounds, opacity and visibility. |
24 virtual void OnSplitViewMode(aura::Window* left, | 30 virtual void OnSelectWindow(aura::Window* window, SplitType split_type) = 0; |
sadrul
2014/09/07 05:26:49
We are going to support changing the selection on
pkotwicz
2014/09/08 19:39:23
I renamed OnSplitViewMode() to SelectSplitViewWind
| |
25 aura::Window* right) = 0; | |
26 }; | 31 }; |
27 | 32 |
28 class WindowOverviewMode { | 33 class WindowOverviewMode { |
29 public: | 34 public: |
30 virtual ~WindowOverviewMode() {} | 35 virtual ~WindowOverviewMode() {} |
31 | 36 |
32 static scoped_ptr<WindowOverviewMode> Create( | 37 static scoped_ptr<WindowOverviewMode> Create( |
33 aura::Window* container, | 38 aura::Window* container, |
34 const WindowListProvider* window_list_provider, | 39 const WindowListProvider* window_list_provider, |
35 SplitViewController* split_view_controller, | 40 SplitViewController* split_view_controller, |
36 WindowOverviewModeDelegate* delegate); | 41 WindowOverviewModeDelegate* delegate); |
42 | |
43 // Selects the default window based on overview mode's current state. | |
44 virtual void SelectDefaultWindow() = 0; | |
37 }; | 45 }; |
38 | 46 |
39 } // namespace athena | 47 } // namespace athena |
40 | 48 |
41 #endif // ATHENA_WM_WINDOW_OVERVIEW_MODE_H_ | 49 #endif // ATHENA_WM_WINDOW_OVERVIEW_MODE_H_ |
OLD | NEW |