| 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_COMMON_WM_SHELL_H_ | 5 #ifndef ASH_COMMON_WM_SHELL_H_ |
| 6 #define ASH_COMMON_WM_SHELL_H_ | 6 #define ASH_COMMON_WM_SHELL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 } | 104 } |
| 105 | 105 |
| 106 MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); } | 106 MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); } |
| 107 | 107 |
| 108 MediaDelegate* media_delegate() { return media_delegate_.get(); } | 108 MediaDelegate* media_delegate() { return media_delegate_.get(); } |
| 109 | 109 |
| 110 NewWindowDelegate* new_window_delegate() { | 110 NewWindowDelegate* new_window_delegate() { |
| 111 return new_window_delegate_.get(); | 111 return new_window_delegate_.get(); |
| 112 } | 112 } |
| 113 | 113 |
| 114 WmWindow* root_window_for_new_windows() { |
| 115 return root_window_for_new_windows_; |
| 116 } |
| 117 |
| 118 // NOTE: Prefer ScopedRootWindowForNewWindows when setting temporarily. |
| 119 void set_root_window_for_new_windows(WmWindow* root) { |
| 120 root_window_for_new_windows_ = root; |
| 121 } |
| 122 |
| 114 ShelfDelegate* shelf_delegate() { return shelf_delegate_.get(); } | 123 ShelfDelegate* shelf_delegate() { return shelf_delegate_.get(); } |
| 115 | 124 |
| 116 ShelfModel* shelf_model() { return shelf_model_.get(); } | 125 ShelfModel* shelf_model() { return shelf_model_.get(); } |
| 117 | 126 |
| 118 SystemTrayNotifier* system_tray_notifier() { | 127 SystemTrayNotifier* system_tray_notifier() { |
| 119 return system_tray_notifier_.get(); | 128 return system_tray_notifier_.get(); |
| 120 } | 129 } |
| 121 | 130 |
| 122 SystemTrayDelegate* system_tray_delegate() { | 131 SystemTrayDelegate* system_tray_delegate() { |
| 123 return system_tray_delegate_.get(); | 132 return system_tray_delegate_.get(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 138 virtual WmWindow* NewContainerWindow() = 0; | 147 virtual WmWindow* NewContainerWindow() = 0; |
| 139 | 148 |
| 140 virtual WmWindow* GetFocusedWindow() = 0; | 149 virtual WmWindow* GetFocusedWindow() = 0; |
| 141 virtual WmWindow* GetActiveWindow() = 0; | 150 virtual WmWindow* GetActiveWindow() = 0; |
| 142 | 151 |
| 143 virtual WmWindow* GetPrimaryRootWindow() = 0; | 152 virtual WmWindow* GetPrimaryRootWindow() = 0; |
| 144 | 153 |
| 145 // Returns the root window for the specified display. | 154 // Returns the root window for the specified display. |
| 146 virtual WmWindow* GetRootWindowForDisplayId(int64_t display_id) = 0; | 155 virtual WmWindow* GetRootWindowForDisplayId(int64_t display_id) = 0; |
| 147 | 156 |
| 148 // Returns the root window that newly created windows should be added to. | |
| 149 // NOTE: this returns the root, newly created window should be added to the | |
| 150 // appropriate container in the returned window. | |
| 151 virtual WmWindow* GetRootWindowForNewWindows() = 0; | |
| 152 | |
| 153 // Retuns the display info associated with |display_id|. | 157 // Retuns the display info associated with |display_id|. |
| 154 // TODO(msw): Remove this when DisplayManager has been moved. crbug.com/622480 | 158 // TODO(msw): Remove this when DisplayManager has been moved. crbug.com/622480 |
| 155 virtual const DisplayInfo& GetDisplayInfo(int64_t display_id) const = 0; | 159 virtual const DisplayInfo& GetDisplayInfo(int64_t display_id) const = 0; |
| 156 | 160 |
| 157 // Matches that of DisplayManager::IsActiveDisplayId(). | 161 // Matches that of DisplayManager::IsActiveDisplayId(). |
| 158 // TODO: Remove this when DisplayManager has been moved. crbug.com/622480 | 162 // TODO: Remove this when DisplayManager has been moved. crbug.com/622480 |
| 159 virtual bool IsActiveDisplayId(int64_t display_id) const = 0; | 163 virtual bool IsActiveDisplayId(int64_t display_id) const = 0; |
| 160 | 164 |
| 161 // Returns true if the first window shown on first run should be | 165 // Returns true if the first window shown on first run should be |
| 162 // unconditionally maximized, overriding the heuristic that normally chooses | 166 // unconditionally maximized, overriding the heuristic that normally chooses |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 std::unique_ptr<ShelfDelegate> shelf_delegate_; | 346 std::unique_ptr<ShelfDelegate> shelf_delegate_; |
| 343 std::unique_ptr<ShelfModel> shelf_model_; | 347 std::unique_ptr<ShelfModel> shelf_model_; |
| 344 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; | 348 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; |
| 345 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; | 349 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; |
| 346 std::unique_ptr<ToastManager> toast_manager_; | 350 std::unique_ptr<ToastManager> toast_manager_; |
| 347 std::unique_ptr<WindowCycleController> window_cycle_controller_; | 351 std::unique_ptr<WindowCycleController> window_cycle_controller_; |
| 348 std::unique_ptr<WindowSelectorController> window_selector_controller_; | 352 std::unique_ptr<WindowSelectorController> window_selector_controller_; |
| 349 | 353 |
| 350 base::ObserverList<LockStateObserver> lock_state_observers_; | 354 base::ObserverList<LockStateObserver> lock_state_observers_; |
| 351 | 355 |
| 356 // The root window that newly created windows should be added to. |
| 357 // NOTE: This is the root, so newly created windows should be added to the |
| 358 // appropriate container inside this window. |
| 359 WmWindow* root_window_for_new_windows_ = nullptr; |
| 360 |
| 352 bool simulate_modal_window_open_for_testing_ = false; | 361 bool simulate_modal_window_open_for_testing_ = false; |
| 353 | 362 |
| 354 #if defined(OS_CHROMEOS) | 363 #if defined(OS_CHROMEOS) |
| 355 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; | 364 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; |
| 356 #endif | 365 #endif |
| 357 }; | 366 }; |
| 358 | 367 |
| 359 } // namespace ash | 368 } // namespace ash |
| 360 | 369 |
| 361 #endif // ASH_COMMON_WM_SHELL_H_ | 370 #endif // ASH_COMMON_WM_SHELL_H_ |
| OLD | NEW |