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_SPLIT_VIEW_CONTROLLER_H_ | 5 #ifndef ATHENA_WM_SPLIT_VIEW_CONTROLLER_H_ |
6 #define ATHENA_WM_SPLIT_VIEW_CONTROLLER_H_ | 6 #define ATHENA_WM_SPLIT_VIEW_CONTROLLER_H_ |
7 | 7 |
8 #include "athena/athena_export.h" | 8 #include "athena/athena_export.h" |
9 #include "athena/util/drag_handle.h" | 9 #include "athena/util/drag_handle.h" |
10 #include "athena/wm/bezel_controller.h" | 10 #include "athena/wm/bezel_controller.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 SplitViewController(aura::Window* container, | 41 SplitViewController(aura::Window* container, |
42 WindowListProvider* window_list_provider); | 42 WindowListProvider* window_list_provider); |
43 | 43 |
44 virtual ~SplitViewController(); | 44 virtual ~SplitViewController(); |
45 | 45 |
46 bool CanActivateSplitViewMode() const; | 46 bool CanActivateSplitViewMode() const; |
47 bool IsSplitViewModeActive() const; | 47 bool IsSplitViewModeActive() const; |
48 | 48 |
49 // Activates split-view mode with |left| and |right| windows. If |left| and/or | 49 // Activates split-view mode with |left| and |right| windows. If |left| and/or |
50 // |right| is NULL, then the first window in the window-list (which is neither | 50 // |right| is NULL, then the first window in the window-list (which is neither |
51 // |left| nor |right|) is selected instead. | 51 // |left| nor |right|) is selected instead. |to_activate| indicates which of |
52 void ActivateSplitMode(aura::Window* left, aura::Window* right); | 52 // |left| or |right| should be activated. If |to_activate| is NULL, the |
| 53 // currently active window is kept active if it is one of the split-view |
| 54 // windows. |
| 55 void ActivateSplitMode(aura::Window* left, |
| 56 aura::Window* right, |
| 57 aura::Window* to_activate); |
53 | 58 |
54 // Resets the internal state to an inactive state. | 59 // Resets the internal state to an inactive state. |
55 void DeactivateSplitMode(); | 60 void DeactivateSplitMode(); |
56 | 61 |
57 // Replaces |window| in split-view mode with |replace_with|. Adjusts | 62 // Replaces |window| in split-view mode with |replace_with|. Adjusts |
58 // |replace_with|'s visibility, transform and bounds. Resets |window|'s | 63 // |replace_with|'s visibility, transform and bounds. Resets |window|'s |
59 // visibility and transform but does not change its bounds. | 64 // visibility and transform but does not change its bounds. |
60 void ReplaceWindow(aura::Window* window, | 65 void ReplaceWindow(aura::Window* window, |
61 aura::Window* replace_with); | 66 aura::Window* replace_with); |
62 | 67 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 std::vector<aura::Window*> to_hide_; | 160 std::vector<aura::Window*> to_hide_; |
156 | 161 |
157 base::WeakPtrFactory<SplitViewController> weak_factory_; | 162 base::WeakPtrFactory<SplitViewController> weak_factory_; |
158 | 163 |
159 DISALLOW_COPY_AND_ASSIGN(SplitViewController); | 164 DISALLOW_COPY_AND_ASSIGN(SplitViewController); |
160 }; | 165 }; |
161 | 166 |
162 } // namespace athena | 167 } // namespace athena |
163 | 168 |
164 #endif // ATHENA_WM_SPLIT_VIEW_CONTROLLER_H_ | 169 #endif // ATHENA_WM_SPLIT_VIEW_CONTROLLER_H_ |
OLD | NEW |