| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_ROOT_WINDOW_CONTROLLER_H_ | 5 #ifndef ASH_ROOT_WINDOW_CONTROLLER_H_ |
| 6 #define ASH_ROOT_WINDOW_CONTROLLER_H_ | 6 #define ASH_ROOT_WINDOW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 namespace wm { | 73 namespace wm { |
| 74 class RootWindowLayoutManager; | 74 class RootWindowLayoutManager; |
| 75 } | 75 } |
| 76 | 76 |
| 77 // This class maintains the per root window state for ash. This class | 77 // This class maintains the per root window state for ash. This class |
| 78 // owns the root window and other dependent objects that should be | 78 // owns the root window and other dependent objects that should be |
| 79 // deleted upon the deletion of the root window. This object is | 79 // deleted upon the deletion of the root window. This object is |
| 80 // indirectly owned and deleted by |WindowTreeHostManager|. | 80 // indirectly owned and deleted by |WindowTreeHostManager|. |
| 81 // The RootWindowController for particular root window is stored in | 81 // The RootWindowController for particular root window is stored in |
| 82 // its property (RootWindowSettings) and can be obtained using | 82 // its property (RootWindowSettings) and can be obtained using |
| 83 // |GetRootWindowController(aura::WindowEventDispatcher*)| function. | 83 // |RootWindowController::ForWindow(aura::Window*)| function. |
| 84 class ASH_EXPORT RootWindowController : public ShellObserver { | 84 class ASH_EXPORT RootWindowController : public ShellObserver { |
| 85 public: | 85 public: |
| 86 // Enumerates the type of display. If there is only a single display then | 86 // Enumerates the type of display. If there is only a single display then |
| 87 // it is primary. In a multi-display environment one monitor is deemed the | 87 // it is primary. In a multi-display environment one monitor is deemed the |
| 88 // PRIMARY and all others SECONDARY. | 88 // PRIMARY and all others SECONDARY. |
| 89 enum class RootWindowType { PRIMARY, SECONDARY }; | 89 enum class RootWindowType { PRIMARY, SECONDARY }; |
| 90 | 90 |
| 91 ~RootWindowController() override; | 91 ~RootWindowController() override; |
| 92 | 92 |
| 93 // Creates and Initialize the RootWindowController for primary display. | 93 // Creates and Initialize the RootWindowController for primary display. |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 // Handles double clicks on the panel window header. | 368 // Handles double clicks on the panel window header. |
| 369 std::unique_ptr<ui::EventHandler> panel_container_handler_; | 369 std::unique_ptr<ui::EventHandler> panel_container_handler_; |
| 370 | 370 |
| 371 std::unique_ptr<::wm::ScopedCaptureClient> capture_client_; | 371 std::unique_ptr<::wm::ScopedCaptureClient> capture_client_; |
| 372 | 372 |
| 373 static std::vector<RootWindowController*>* root_window_controllers_; | 373 static std::vector<RootWindowController*>* root_window_controllers_; |
| 374 | 374 |
| 375 DISALLOW_COPY_AND_ASSIGN(RootWindowController); | 375 DISALLOW_COPY_AND_ASSIGN(RootWindowController); |
| 376 }; | 376 }; |
| 377 | 377 |
| 378 // On classic ash, returns the RootWindowController for the given |root_window|. | |
| 379 // On mus ash, returns the RootWindowController for the primary display. | |
| 380 // See RootWindowController class comment above. | |
| 381 ASH_EXPORT RootWindowController* GetRootWindowController( | |
| 382 const aura::Window* root_window); | |
| 383 | |
| 384 } // namespace ash | 378 } // namespace ash |
| 385 | 379 |
| 386 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_ | 380 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_ |
| OLD | NEW |