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/wm/bezel_controller.h" | 8 #include "athena/wm/bezel_controller.h" |
9 #include "athena/wm/public/window_manager_observer.h" | 9 #include "athena/wm/public/window_manager_observer.h" |
10 #include "athena/wm/window_overview_mode.h" | 10 #include "athena/wm/window_overview_mode.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 public WindowManagerObserver { | 26 public WindowManagerObserver { |
27 public: | 27 public: |
28 SplitViewController(aura::Window* container, | 28 SplitViewController(aura::Window* container, |
29 WindowListProvider* window_list_provider, | 29 WindowListProvider* window_list_provider, |
30 WindowManager* window_manager); | 30 WindowManager* window_manager); |
31 | 31 |
32 virtual ~SplitViewController(); | 32 virtual ~SplitViewController(); |
33 | 33 |
34 bool IsSplitViewModeActive() const; | 34 bool IsSplitViewModeActive() const; |
35 | 35 |
| 36 // Activates split-view mode with |left| and |right| windows. If |left| and/or |
| 37 // |right| is NULL, then the first window in the window-list (which is neither |
| 38 // |left| nor |right|) is selected instead. |
| 39 void ActivateSplitMode(aura::Window* left, aura::Window* right); |
| 40 |
36 private: | 41 private: |
37 enum State { | 42 enum State { |
38 // Split View mode is not active. |left_window_| and |right_window| are | 43 // Split View mode is not active. |left_window_| and |right_window| are |
39 // NULL. | 44 // NULL. |
40 INACTIVE, | 45 INACTIVE, |
41 // Two windows |left_window_| and |right_window| are shown side by side and | 46 // Two windows |left_window_| and |right_window| are shown side by side and |
42 // there is a horizontal scroll in progress which is dragging the separator | 47 // there is a horizontal scroll in progress which is dragging the separator |
43 // between the two windows. | 48 // between the two windows. |
44 SCROLLING, | 49 SCROLLING, |
45 // Split View mode is active with |left_window_| and |right_window| showing | 50 // Split View mode is active with |left_window_| and |right_window| showing |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 int separator_position_; | 103 int separator_position_; |
99 | 104 |
100 base::WeakPtrFactory<SplitViewController> weak_factory_; | 105 base::WeakPtrFactory<SplitViewController> weak_factory_; |
101 | 106 |
102 DISALLOW_COPY_AND_ASSIGN(SplitViewController); | 107 DISALLOW_COPY_AND_ASSIGN(SplitViewController); |
103 }; | 108 }; |
104 | 109 |
105 } // namespace athena | 110 } // namespace athena |
106 | 111 |
107 #endif // ATHENA_WM_SPLIT_VIEW_CONTROLLER_H_ | 112 #endif // ATHENA_WM_SPLIT_VIEW_CONTROLLER_H_ |
OLD | NEW |