| 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/wm/bezel_controller.h" | 9 #include "athena/wm/bezel_controller.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // Activates split-view mode with |left| and |right| windows. If |left| and/or | 32 // Activates split-view mode with |left| and |right| windows. If |left| and/or |
| 33 // |right| is NULL, then the first window in the window-list (which is neither | 33 // |right| is NULL, then the first window in the window-list (which is neither |
| 34 // |left| nor |right|) is selected instead. | 34 // |left| nor |right|) is selected instead. |
| 35 void ActivateSplitMode(aura::Window* left, aura::Window* right); | 35 void ActivateSplitMode(aura::Window* left, aura::Window* right); |
| 36 | 36 |
| 37 // Resets the internal state to an inactive state. Calling this does not | 37 // Resets the internal state to an inactive state. Calling this does not |
| 38 // change the window bounds/transforms etc. The caller must take care of | 38 // change the window bounds/transforms etc. The caller must take care of |
| 39 // making any necessary changes. | 39 // making any necessary changes. |
| 40 void DeactivateSplitMode(); | 40 void DeactivateSplitMode(); |
| 41 | 41 |
| 42 void ReplaceWindow(aura::Window* window, |
| 43 aura::Window* replace_with); |
| 44 |
| 42 aura::Window* left_window() { return left_window_; } | 45 aura::Window* left_window() { return left_window_; } |
| 43 aura::Window* right_window() { return right_window_; } | 46 aura::Window* right_window() { return right_window_; } |
| 44 | 47 |
| 45 private: | 48 private: |
| 46 enum State { | 49 enum State { |
| 47 // Split View mode is not active. |left_window_| and |right_window| are | 50 // Split View mode is not active. |left_window_| and |right_window| are |
| 48 // NULL. | 51 // NULL. |
| 49 INACTIVE, | 52 INACTIVE, |
| 50 // Two windows |left_window_| and |right_window| are shown side by side and | 53 // Two windows |left_window_| and |right_window| are shown side by side and |
| 51 // there is a horizontal scroll in progress which is dragging the separator | 54 // there is a horizontal scroll in progress which is dragging the separator |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 int separator_position_; | 92 int separator_position_; |
| 90 | 93 |
| 91 base::WeakPtrFactory<SplitViewController> weak_factory_; | 94 base::WeakPtrFactory<SplitViewController> weak_factory_; |
| 92 | 95 |
| 93 DISALLOW_COPY_AND_ASSIGN(SplitViewController); | 96 DISALLOW_COPY_AND_ASSIGN(SplitViewController); |
| 94 }; | 97 }; |
| 95 | 98 |
| 96 } // namespace athena | 99 } // namespace athena |
| 97 | 100 |
| 98 #endif // ATHENA_WM_SPLIT_VIEW_CONTROLLER_H_ | 101 #endif // ATHENA_WM_SPLIT_VIEW_CONTROLLER_H_ |
| OLD | NEW |