OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 ASH_WM_SCREEN_PINNING_CONTROLLER_H_ | 5 #ifndef ASH_WM_SCREEN_PINNING_CONTROLLER_H_ |
6 #define ASH_WM_SCREEN_PINNING_CONTROLLER_H_ | 6 #define ASH_WM_SCREEN_PINNING_CONTROLLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 WindowTreeHostManager* window_tree_host_manager); | 24 WindowTreeHostManager* window_tree_host_manager); |
25 ~ScreenPinningController() override; | 25 ~ScreenPinningController() override; |
26 | 26 |
27 // Sets a pinned window. It is not allowed to call this when there already | 27 // Sets a pinned window. It is not allowed to call this when there already |
28 // is a pinned window. | 28 // is a pinned window. |
29 void SetPinnedWindow(WmWindow* pinned_window); | 29 void SetPinnedWindow(WmWindow* pinned_window); |
30 | 30 |
31 // Returns true if in pinned mode, otherwise false. | 31 // Returns true if in pinned mode, otherwise false. |
32 bool IsPinned() const; | 32 bool IsPinned() const; |
33 | 33 |
| 34 // Returns the pinned window if in pinned mode, or nullptr. |
| 35 WmWindow* pinned_window() const { return pinned_window_; } |
| 36 |
34 // Called when a new window is added to the container which has the pinned | 37 // Called when a new window is added to the container which has the pinned |
35 // window. | 38 // window. |
36 void OnWindowAddedToPinnedContainer(WmWindow* new_window); | 39 void OnWindowAddedToPinnedContainer(WmWindow* new_window); |
37 | 40 |
38 // Called when a window will be removed from the container which has the | 41 // Called when a window will be removed from the container which has the |
39 // pinned window. | 42 // pinned window. |
40 void OnWillRemoveWindowFromPinnedContainer(WmWindow* window); | 43 void OnWillRemoveWindowFromPinnedContainer(WmWindow* window); |
41 | 44 |
42 // Called when a window stacking is changed in the container which has the | 45 // Called when a window stacking is changed in the container which has the |
43 // pinned window. | 46 // pinned window. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 std::unique_ptr<SystemModalContainerChildWindowObserver> | 108 std::unique_ptr<SystemModalContainerChildWindowObserver> |
106 system_modal_container_child_window_observer_; | 109 system_modal_container_child_window_observer_; |
107 std::unique_ptr<DimWindowObserver> dim_window_observer_; | 110 std::unique_ptr<DimWindowObserver> dim_window_observer_; |
108 | 111 |
109 DISALLOW_COPY_AND_ASSIGN(ScreenPinningController); | 112 DISALLOW_COPY_AND_ASSIGN(ScreenPinningController); |
110 }; | 113 }; |
111 | 114 |
112 } // namespace ash | 115 } // namespace ash |
113 | 116 |
114 #endif // ASH_WM_SCREEN_PINNING_CONTROLLER_H_ | 117 #endif // ASH_WM_SCREEN_PINNING_CONTROLLER_H_ |
OLD | NEW |