Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: services/ui/ws/window_server.h

Issue 2582823002: WIP: Surface Synchronization System
Patch Set: Only create ClientSurfaceEmbedder if window is visible. Trash it otherwise. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 const DisplayManager* display_manager() const { 63 const DisplayManager* display_manager() const {
64 return display_manager_.get(); 64 return display_manager_.get();
65 } 65 }
66 66
67 GpuHost* gpu_host() { return gpu_host_.get(); } 67 GpuHost* gpu_host() { return gpu_host_.get(); }
68 68
69 // Creates a new ServerWindow. The return value is owned by the caller, but 69 // Creates a new ServerWindow. The return value is owned by the caller, but
70 // must be destroyed before WindowServer. 70 // must be destroyed before WindowServer.
71 ServerWindow* CreateServerWindow( 71 ServerWindow* CreateServerWindow(
72 const WindowId& id, 72 const WindowId& id,
73 const std::map<std::string, std::vector<uint8_t>>& properties); 73 const std::map<std::string, std::vector<uint8_t>>& properties,
74 const cc::LocalFrameId& local_frame_id);
74 75
75 // Returns the id for the next WindowTree. 76 // Returns the id for the next WindowTree.
76 ClientSpecificId GetAndAdvanceNextClientId(); 77 ClientSpecificId GetAndAdvanceNextClientId();
77 78
78 // See description of WindowTree::Embed() for details. This assumes 79 // See description of WindowTree::Embed() for details. This assumes
79 // |transport_window_id| is valid. 80 // |transport_window_id| is valid.
80 WindowTree* EmbedAtWindow(ServerWindow* root, 81 WindowTree* EmbedAtWindow(ServerWindow* root,
81 const UserId& user_id, 82 const UserId& user_id,
82 mojom::WindowTreeClientPtr client, 83 mojom::WindowTreeClientPtr client,
83 uint32_t flags, 84 uint32_t flags,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 const ServerWindow* window); 163 const ServerWindow* window);
163 164
164 // Called when we get an unexpected message from the WindowManager. 165 // Called when we get an unexpected message from the WindowManager.
165 // TODO(sky): decide what we want to do here. 166 // TODO(sky): decide what we want to do here.
166 void WindowManagerSentBogusMessage() {} 167 void WindowManagerSentBogusMessage() {}
167 168
168 // These functions trivially delegate to all WindowTrees, which in 169 // These functions trivially delegate to all WindowTrees, which in
169 // term notify their clients. 170 // term notify their clients.
170 void ProcessWindowBoundsChanged(const ServerWindow* window, 171 void ProcessWindowBoundsChanged(const ServerWindow* window,
171 const gfx::Rect& old_bounds, 172 const gfx::Rect& old_bounds,
172 const gfx::Rect& new_bounds); 173 const gfx::Rect& new_bounds,
174 const cc::LocalFrameId& local_frame_id);
173 void ProcessClientAreaChanged( 175 void ProcessClientAreaChanged(
174 const ServerWindow* window, 176 const ServerWindow* window,
175 const gfx::Insets& new_client_area, 177 const gfx::Insets& new_client_area,
176 const std::vector<gfx::Rect>& new_additional_client_areas); 178 const std::vector<gfx::Rect>& new_additional_client_areas);
177 void ProcessCaptureChanged(const ServerWindow* new_capture, 179 void ProcessCaptureChanged(const ServerWindow* new_capture,
178 const ServerWindow* old_capture); 180 const ServerWindow* old_capture);
179 void ProcessWillChangeWindowHierarchy(const ServerWindow* window, 181 void ProcessWillChangeWindowHierarchy(const ServerWindow* window,
180 const ServerWindow* new_parent, 182 const ServerWindow* new_parent,
181 const ServerWindow* old_parent); 183 const ServerWindow* old_parent);
182 void ProcessWindowHierarchyChanged(const ServerWindow* window, 184 void ProcessWindowHierarchyChanged(const ServerWindow* window,
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 // Overridden from ServerWindowObserver: 291 // Overridden from ServerWindowObserver:
290 void OnWindowDestroyed(ServerWindow* window) override; 292 void OnWindowDestroyed(ServerWindow* window) override;
291 void OnWillChangeWindowHierarchy(ServerWindow* window, 293 void OnWillChangeWindowHierarchy(ServerWindow* window,
292 ServerWindow* new_parent, 294 ServerWindow* new_parent,
293 ServerWindow* old_parent) override; 295 ServerWindow* old_parent) override;
294 void OnWindowHierarchyChanged(ServerWindow* window, 296 void OnWindowHierarchyChanged(ServerWindow* window,
295 ServerWindow* new_parent, 297 ServerWindow* new_parent,
296 ServerWindow* old_parent) override; 298 ServerWindow* old_parent) override;
297 void OnWindowBoundsChanged(ServerWindow* window, 299 void OnWindowBoundsChanged(ServerWindow* window,
298 const gfx::Rect& old_bounds, 300 const gfx::Rect& old_bounds,
299 const gfx::Rect& new_bounds) override; 301 const gfx::Rect& new_bounds,
302 const cc::LocalFrameId& local_frame_id) override;
300 void OnWindowClientAreaChanged( 303 void OnWindowClientAreaChanged(
301 ServerWindow* window, 304 ServerWindow* window,
302 const gfx::Insets& new_client_area, 305 const gfx::Insets& new_client_area,
303 const std::vector<gfx::Rect>& new_additional_client_areas) override; 306 const std::vector<gfx::Rect>& new_additional_client_areas) override;
304 void OnWindowReordered(ServerWindow* window, 307 void OnWindowReordered(ServerWindow* window,
305 ServerWindow* relative, 308 ServerWindow* relative,
306 mojom::OrderDirection direction) override; 309 mojom::OrderDirection direction) override;
307 void OnWillChangeWindowVisibility(ServerWindow* window) override; 310 void OnWillChangeWindowVisibility(ServerWindow* window) override;
308 void OnWindowVisibilityChanged(ServerWindow* window) override; 311 void OnWindowVisibilityChanged(ServerWindow* window) override;
309 void OnWindowOpacityChanged(ServerWindow* window, 312 void OnWindowOpacityChanged(ServerWindow* window,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 // State for rendering into a Surface. 382 // State for rendering into a Surface.
380 cc::mojom::DisplayCompositorPtr display_compositor_; 383 cc::mojom::DisplayCompositorPtr display_compositor_;
381 384
382 DISALLOW_COPY_AND_ASSIGN(WindowServer); 385 DISALLOW_COPY_AND_ASSIGN(WindowServer);
383 }; 386 };
384 387
385 } // namespace ws 388 } // namespace ws
386 } // namespace ui 389 } // namespace ui
387 390
388 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_ 391 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698