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> |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 uint32_t GetCurrentDragLoopChangeId(); | 221 uint32_t GetCurrentDragLoopChangeId(); |
222 ServerWindow* GetCurrentDragLoopWindow(); | 222 ServerWindow* GetCurrentDragLoopWindow(); |
223 WindowTree* GetCurrentDragLoopInitiator(); | 223 WindowTree* GetCurrentDragLoopInitiator(); |
224 bool in_drag_loop() const { return !!current_drag_loop_; } | 224 bool in_drag_loop() const { return !!current_drag_loop_; } |
225 | 225 |
226 void OnDisplayReady(Display* display, bool is_first); | 226 void OnDisplayReady(Display* display, bool is_first); |
227 void OnNoMoreDisplays(); | 227 void OnNoMoreDisplays(); |
228 WindowManagerState* GetWindowManagerStateForUser(const UserId& user_id); | 228 WindowManagerState* GetWindowManagerStateForUser(const UserId& user_id); |
229 | 229 |
230 // ServerWindowDelegate: | 230 // ServerWindowDelegate: |
231 ui::DisplayCompositor* GetDisplayCompositor() override; | 231 cc::mojom::DisplayCompositor* GetDisplayCompositor() override; |
232 | 232 |
233 // UserDisplayManagerDelegate: | 233 // UserDisplayManagerDelegate: |
234 bool GetFrameDecorationsForUser( | 234 bool GetFrameDecorationsForUser( |
235 const UserId& user_id, | 235 const UserId& user_id, |
236 mojom::FrameDecorationValuesPtr* values) override; | 236 mojom::FrameDecorationValuesPtr* values) override; |
237 | 237 |
238 private: | 238 private: |
239 struct CurrentMoveLoopState; | 239 struct CurrentMoveLoopState; |
240 struct CurrentDragLoopState; | 240 struct CurrentDragLoopState; |
241 friend class Operation; | 241 friend class Operation; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 void OnWindowNonClientCursorChanged(ServerWindow* window, | 318 void OnWindowNonClientCursorChanged(ServerWindow* window, |
319 mojom::Cursor cursor_id) override; | 319 mojom::Cursor cursor_id) override; |
320 void OnWindowTextInputStateChanged(ServerWindow* window, | 320 void OnWindowTextInputStateChanged(ServerWindow* window, |
321 const ui::TextInputState& state) override; | 321 const ui::TextInputState& state) override; |
322 void OnTransientWindowAdded(ServerWindow* window, | 322 void OnTransientWindowAdded(ServerWindow* window, |
323 ServerWindow* transient_child) override; | 323 ServerWindow* transient_child) override; |
324 void OnTransientWindowRemoved(ServerWindow* window, | 324 void OnTransientWindowRemoved(ServerWindow* window, |
325 ServerWindow* transient_child) override; | 325 ServerWindow* transient_child) override; |
326 | 326 |
327 // GpuServiceProxyDelegate: | 327 // GpuServiceProxyDelegate: |
328 void OnGpuChannelEstablished( | 328 void OnGpuServiceInitialized() override; |
329 scoped_refptr<gpu::GpuChannelHost> gpu_channel) override; | |
330 | 329 |
331 // cc::mojom::DisplayCompositorClient: | 330 // cc::mojom::DisplayCompositorClient: |
332 void OnSurfaceCreated(const cc::SurfaceId& surface_id, | 331 void OnSurfaceCreated(const cc::SurfaceId& surface_id, |
333 const gfx::Size& frame_size, | 332 const gfx::Size& frame_size, |
334 float device_scale_factor) override; | 333 float device_scale_factor) override; |
335 | 334 |
336 // UserIdTrackerObserver: | 335 // UserIdTrackerObserver: |
337 void OnActiveUserIdChanged(const UserId& previously_active_id, | 336 void OnActiveUserIdChanged(const UserId& previously_active_id, |
338 const UserId& active_id) override; | 337 const UserId& active_id) override; |
339 void OnUserIdAdded(const UserId& id) override; | 338 void OnUserIdAdded(const UserId& id) override; |
(...skipping 22 matching lines...) Expand all Loading... |
362 std::map<UserId, bool> high_contrast_mode_; | 361 std::map<UserId, bool> high_contrast_mode_; |
363 | 362 |
364 // Maps from window manager change id to the client that initiated the | 363 // Maps from window manager change id to the client that initiated the |
365 // request. | 364 // request. |
366 InFlightWindowManagerChangeMap in_flight_wm_change_map_; | 365 InFlightWindowManagerChangeMap in_flight_wm_change_map_; |
367 | 366 |
368 // Next id supplied to the window manager. | 367 // Next id supplied to the window manager. |
369 uint32_t next_wm_change_id_; | 368 uint32_t next_wm_change_id_; |
370 | 369 |
371 std::unique_ptr<GpuServiceProxy> gpu_proxy_; | 370 std::unique_ptr<GpuServiceProxy> gpu_proxy_; |
372 // TODO(fsamuel): The window server should not have a GPU channel. | |
373 scoped_refptr<gpu::GpuChannelHost> gpu_channel_; | |
374 base::Callback<void(ServerWindow*)> window_paint_callback_; | 371 base::Callback<void(ServerWindow*)> window_paint_callback_; |
375 | 372 |
376 UserActivityMonitorMap activity_monitor_map_; | 373 UserActivityMonitorMap activity_monitor_map_; |
377 | 374 |
378 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_; | 375 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_; |
379 | 376 |
380 mojo::Binding<cc::mojom::DisplayCompositorClient> | 377 mojo::Binding<cc::mojom::DisplayCompositorClient> |
381 display_compositor_client_binding_; | 378 display_compositor_client_binding_; |
382 // State for rendering into a Surface. | 379 // State for rendering into a Surface. |
383 scoped_refptr<ui::DisplayCompositor> display_compositor_; | 380 cc::mojom::DisplayCompositorPtr display_compositor_; |
| 381 cc::mojom::DisplayCompositorRequest display_compositor_request_; |
384 | 382 |
385 DISALLOW_COPY_AND_ASSIGN(WindowServer); | 383 DISALLOW_COPY_AND_ASSIGN(WindowServer); |
386 }; | 384 }; |
387 | 385 |
388 } // namespace ws | 386 } // namespace ws |
389 } // namespace ui | 387 } // namespace ui |
390 | 388 |
391 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_ | 389 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_ |
OLD | NEW |