| 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/memory/weak_ptr.h" |
| 16 #include "base/optional.h" | 17 #include "base/optional.h" |
| 17 #include "cc/ipc/frame_sink_manager.mojom.h" | 18 #include "cc/ipc/frame_sink_manager.mojom.h" |
| 18 #include "mojo/public/cpp/bindings/binding.h" | 19 #include "mojo/public/cpp/bindings/binding.h" |
| 19 #include "services/ui/public/interfaces/window_manager_window_tree_factory.mojom
.h" | 20 #include "services/ui/public/interfaces/window_manager_window_tree_factory.mojom
.h" |
| 20 #include "services/ui/public/interfaces/window_tree.mojom.h" | 21 #include "services/ui/public/interfaces/window_tree.mojom.h" |
| 21 #include "services/ui/ws/gpu_host_delegate.h" | 22 #include "services/ui/ws/gpu_host_delegate.h" |
| 22 #include "services/ui/ws/ids.h" | 23 #include "services/ui/ws/ids.h" |
| 23 #include "services/ui/ws/operation.h" | 24 #include "services/ui/ws/operation.h" |
| 24 #include "services/ui/ws/server_window_delegate.h" | 25 #include "services/ui/ws/server_window_delegate.h" |
| 25 #include "services/ui/ws/server_window_observer.h" | 26 #include "services/ui/ws/server_window_observer.h" |
| 26 #include "services/ui/ws/user_display_manager_delegate.h" | 27 #include "services/ui/ws/user_display_manager_delegate.h" |
| 27 #include "services/ui/ws/user_id_tracker.h" | 28 #include "services/ui/ws/user_id_tracker.h" |
| 28 #include "services/ui/ws/user_id_tracker_observer.h" | 29 #include "services/ui/ws/user_id_tracker_observer.h" |
| 29 #include "services/ui/ws/window_manager_window_tree_factory_set.h" | 30 #include "services/ui/ws/window_manager_window_tree_factory_set.h" |
| 30 | 31 |
| 31 namespace ui { | 32 namespace ui { |
| 32 namespace ws { | 33 namespace ws { |
| 33 | 34 |
| 34 class AccessPolicy; | 35 class AccessPolicy; |
| 35 class Display; | 36 class Display; |
| 36 class DisplayManager; | 37 class DisplayManager; |
| 37 class GpuHost; | 38 class GpuHost; |
| 38 class ServerWindow; | 39 class ServerWindow; |
| 39 class UserActivityMonitor; | 40 class UserActivityMonitor; |
| 41 class WindowManagerDisplayRoot; |
| 40 class WindowManagerState; | 42 class WindowManagerState; |
| 41 class WindowServerDelegate; | 43 class WindowServerDelegate; |
| 42 class WindowTree; | 44 class WindowTree; |
| 43 class WindowTreeBinding; | 45 class WindowTreeBinding; |
| 44 | 46 |
| 45 // WindowServer manages the set of clients of the window server (all the | 47 // WindowServer manages the set of clients of the window server (all the |
| 46 // WindowTrees) as well as providing the root of the hierarchy. | 48 // WindowTrees) as well as providing the root of the hierarchy. |
| 47 class WindowServer : public ServerWindowDelegate, | 49 class WindowServer : public ServerWindowDelegate, |
| 48 public ServerWindowObserver, | 50 public ServerWindowObserver, |
| 49 public GpuHostDelegate, | 51 public GpuHostDelegate, |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 // Updates the native cursor by figuring out what window is under the mouse | 278 // Updates the native cursor by figuring out what window is under the mouse |
| 277 // cursor. This is run in response to events that change the bounds or window | 279 // cursor. This is run in response to events that change the bounds or window |
| 278 // hierarchy. | 280 // hierarchy. |
| 279 void UpdateNativeCursorFromMouseLocation(ServerWindow* window); | 281 void UpdateNativeCursorFromMouseLocation(ServerWindow* window); |
| 280 | 282 |
| 281 // Updates the native cursor if the cursor is currently inside |window|. This | 283 // Updates the native cursor if the cursor is currently inside |window|. This |
| 282 // is run in response to events that change the mouse cursor properties of | 284 // is run in response to events that change the mouse cursor properties of |
| 283 // |window|. | 285 // |window|. |
| 284 void UpdateNativeCursorIfOver(ServerWindow* window); | 286 void UpdateNativeCursorIfOver(ServerWindow* window); |
| 285 | 287 |
| 288 void OnCursorUpdated(WindowManagerDisplayRoot* display_root); |
| 289 |
| 286 bool IsUserInHighContrastMode(const UserId& user) const; | 290 bool IsUserInHighContrastMode(const UserId& user) const; |
| 287 | 291 |
| 288 // Finds the parent client that will embed |surface_id| and claims ownership | 292 // Finds the parent client that will embed |surface_id| and claims ownership |
| 289 // of the temporary reference. If no parent client is found then tell GPU to | 293 // of the temporary reference. If no parent client is found then tell GPU to |
| 290 // immediately drop the temporary reference. |window| is the ServerWindow | 294 // immediately drop the temporary reference. |window| is the ServerWindow |
| 291 // that corresponds to |surface_id|. | 295 // that corresponds to |surface_id|. |
| 292 void HandleTemporaryReferenceForNewSurface(const cc::SurfaceId& surface_id, | 296 void HandleTemporaryReferenceForNewSurface(const cc::SurfaceId& surface_id, |
| 293 ServerWindow* window); | 297 ServerWindow* window); |
| 294 | 298 |
| 295 // Overridden from ServerWindowDelegate: | 299 // Overridden from ServerWindowDelegate: |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 | 385 |
| 382 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_; | 386 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_; |
| 383 | 387 |
| 384 cc::SurfaceId root_surface_id_; | 388 cc::SurfaceId root_surface_id_; |
| 385 | 389 |
| 386 // Provides interfaces to create and manage FrameSinks. | 390 // Provides interfaces to create and manage FrameSinks. |
| 387 mojo::Binding<cc::mojom::FrameSinkManagerClient> | 391 mojo::Binding<cc::mojom::FrameSinkManagerClient> |
| 388 frame_sink_manager_client_binding_; | 392 frame_sink_manager_client_binding_; |
| 389 cc::mojom::FrameSinkManagerPtr frame_sink_manager_; | 393 cc::mojom::FrameSinkManagerPtr frame_sink_manager_; |
| 390 | 394 |
| 395 base::WeakPtrFactory<WindowServer> weak_ptr_factory_; |
| 396 |
| 391 DISALLOW_COPY_AND_ASSIGN(WindowServer); | 397 DISALLOW_COPY_AND_ASSIGN(WindowServer); |
| 392 }; | 398 }; |
| 393 | 399 |
| 394 } // namespace ws | 400 } // namespace ws |
| 395 } // namespace ui | 401 } // namespace ui |
| 396 | 402 |
| 397 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_ | 403 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_ |
| OLD | NEW |