| 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 SERVICES_UI_WS_WINDOW_SERVER_H_ | 5 #ifndef SERVICES_UI_WS_WINDOW_SERVER_H_ |
| 6 #define SERVICES_UI_WS_WINDOW_SERVER_H_ | 6 #define SERVICES_UI_WS_WINDOW_SERVER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/optional.h" | 16 #include "base/optional.h" |
| 17 #include "mojo/public/cpp/bindings/array.h" | 17 #include "mojo/public/cpp/bindings/array.h" |
| 18 #include "mojo/public/cpp/bindings/binding.h" | 18 #include "mojo/public/cpp/bindings/binding.h" |
| 19 #include "services/ui/public/interfaces/window_manager_window_tree_factory.mojom
.h" | 19 #include "services/ui/public/interfaces/window_manager_window_tree_factory.mojom
.h" |
| 20 #include "services/ui/public/interfaces/window_tree.mojom.h" | 20 #include "services/ui/public/interfaces/window_tree.mojom.h" |
| 21 #include "services/ui/public/interfaces/window_tree_host.mojom.h" | 21 #include "services/ui/public/interfaces/window_tree_host.mojom.h" |
| 22 #include "services/ui/surfaces/surfaces_state.h" | 22 #include "services/ui/surfaces/display_compositor.h" |
| 23 #include "services/ui/ws/display.h" | 23 #include "services/ui/ws/display.h" |
| 24 #include "services/ui/ws/gpu_service_proxy_delegate.h" | 24 #include "services/ui/ws/gpu_service_proxy_delegate.h" |
| 25 #include "services/ui/ws/ids.h" | 25 #include "services/ui/ws/ids.h" |
| 26 #include "services/ui/ws/operation.h" | 26 #include "services/ui/ws/operation.h" |
| 27 #include "services/ui/ws/server_window_delegate.h" | 27 #include "services/ui/ws/server_window_delegate.h" |
| 28 #include "services/ui/ws/server_window_observer.h" | 28 #include "services/ui/ws/server_window_observer.h" |
| 29 #include "services/ui/ws/user_display_manager_delegate.h" | 29 #include "services/ui/ws/user_display_manager_delegate.h" |
| 30 #include "services/ui/ws/user_id_tracker.h" | 30 #include "services/ui/ws/user_id_tracker.h" |
| 31 #include "services/ui/ws/user_id_tracker_observer.h" | 31 #include "services/ui/ws/user_id_tracker_observer.h" |
| 32 #include "services/ui/ws/window_manager_window_tree_factory_set.h" | 32 #include "services/ui/ws/window_manager_window_tree_factory_set.h" |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 uint32_t GetCurrentDragLoopChangeId(); | 225 uint32_t GetCurrentDragLoopChangeId(); |
| 226 ServerWindow* GetCurrentDragLoopWindow(); | 226 ServerWindow* GetCurrentDragLoopWindow(); |
| 227 WindowTree* GetCurrentDragLoopInitiator(); | 227 WindowTree* GetCurrentDragLoopInitiator(); |
| 228 bool in_drag_loop() const { return !!current_drag_loop_; } | 228 bool in_drag_loop() const { return !!current_drag_loop_; } |
| 229 | 229 |
| 230 void OnDisplayReady(Display* display, bool is_first); | 230 void OnDisplayReady(Display* display, bool is_first); |
| 231 void OnNoMoreDisplays(); | 231 void OnNoMoreDisplays(); |
| 232 WindowManagerState* GetWindowManagerStateForUser(const UserId& user_id); | 232 WindowManagerState* GetWindowManagerStateForUser(const UserId& user_id); |
| 233 | 233 |
| 234 // ServerWindowDelegate: | 234 // ServerWindowDelegate: |
| 235 ui::SurfacesState* GetSurfacesState() override; | 235 ui::DisplayCompositor* GetDisplayCompositor() override; |
| 236 | 236 |
| 237 // UserDisplayManagerDelegate: | 237 // UserDisplayManagerDelegate: |
| 238 bool GetFrameDecorationsForUser( | 238 bool GetFrameDecorationsForUser( |
| 239 const UserId& user_id, | 239 const UserId& user_id, |
| 240 mojom::FrameDecorationValuesPtr* values) override; | 240 mojom::FrameDecorationValuesPtr* values) override; |
| 241 | 241 |
| 242 private: | 242 private: |
| 243 struct CurrentMoveLoopState; | 243 struct CurrentMoveLoopState; |
| 244 struct CurrentDragLoopState; | 244 struct CurrentDragLoopState; |
| 245 friend class Operation; | 245 friend class Operation; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 void OnActiveUserIdChanged(const UserId& previously_active_id, | 338 void OnActiveUserIdChanged(const UserId& previously_active_id, |
| 339 const UserId& active_id) override; | 339 const UserId& active_id) override; |
| 340 void OnUserIdAdded(const UserId& id) override; | 340 void OnUserIdAdded(const UserId& id) override; |
| 341 void OnUserIdRemoved(const UserId& id) override; | 341 void OnUserIdRemoved(const UserId& id) override; |
| 342 | 342 |
| 343 UserIdTracker user_id_tracker_; | 343 UserIdTracker user_id_tracker_; |
| 344 | 344 |
| 345 WindowServerDelegate* delegate_; | 345 WindowServerDelegate* delegate_; |
| 346 | 346 |
| 347 // State for rendering into a Surface. | 347 // State for rendering into a Surface. |
| 348 scoped_refptr<ui::SurfacesState> surfaces_state_; | 348 scoped_refptr<ui::DisplayCompositor> display_compositor_; |
| 349 | 349 |
| 350 // ID to use for next WindowTree. | 350 // ID to use for next WindowTree. |
| 351 ClientSpecificId next_client_id_; | 351 ClientSpecificId next_client_id_; |
| 352 | 352 |
| 353 std::unique_ptr<DisplayManager> display_manager_; | 353 std::unique_ptr<DisplayManager> display_manager_; |
| 354 | 354 |
| 355 std::unique_ptr<CurrentDragLoopState> current_drag_loop_; | 355 std::unique_ptr<CurrentDragLoopState> current_drag_loop_; |
| 356 std::unique_ptr<CurrentMoveLoopState> current_move_loop_; | 356 std::unique_ptr<CurrentMoveLoopState> current_move_loop_; |
| 357 | 357 |
| 358 // Set of WindowTrees. | 358 // Set of WindowTrees. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 380 | 380 |
| 381 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_; | 381 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_; |
| 382 | 382 |
| 383 DISALLOW_COPY_AND_ASSIGN(WindowServer); | 383 DISALLOW_COPY_AND_ASSIGN(WindowServer); |
| 384 }; | 384 }; |
| 385 | 385 |
| 386 } // namespace ws | 386 } // namespace ws |
| 387 } // namespace ui | 387 } // namespace ui |
| 388 | 388 |
| 389 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_ | 389 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_ |
| OLD | NEW |