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

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

Issue 2474113002: Mus+Ash: Unified BeginFrame Skeleton (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
« no previous file with comments | « services/ui/ws/test_utils.cc ('k') | services/ui/ws/window_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Returns the tree by client id. 100 // Returns the tree by client id.
101 WindowTree* GetTreeWithId(ClientSpecificId client_id); 101 WindowTree* GetTreeWithId(ClientSpecificId client_id);
102 102
103 WindowTree* GetTreeWithClientName(const std::string& client_name); 103 WindowTree* GetTreeWithClientName(const std::string& client_name);
104 104
105 size_t num_trees() const { return tree_map_.size(); } 105 size_t num_trees() const { return tree_map_.size(); }
106 106
107 // Returns the Window identified by |id|. 107 // Returns the Window identified by |id|.
108 ServerWindow* GetWindow(const WindowId& id); 108 ServerWindow* GetWindow(const WindowId& id);
109 109
110 // Schedules a paint for the specified region in the coordinates of |window|.
111 void SchedulePaint(ServerWindow* window, const gfx::Rect& bounds);
112
113 OperationType current_operation_type() const { 110 OperationType current_operation_type() const {
114 return current_operation_ ? current_operation_->type() 111 return current_operation_ ? current_operation_->type()
115 : OperationType::NONE; 112 : OperationType::NONE;
116 } 113 }
117 114
118 // Returns true if the specified client issued the current operation. 115 // Returns true if the specified client issued the current operation.
119 bool IsOperationSource(ClientSpecificId client_id) const { 116 bool IsOperationSource(ClientSpecificId client_id) const {
120 return current_operation_ && 117 return current_operation_ &&
121 current_operation_->source_tree_id() == client_id; 118 current_operation_->source_tree_id() == client_id;
122 } 119 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 const ServerWindow* old_parent); 185 const ServerWindow* old_parent);
189 void ProcessWindowHierarchyChanged(const ServerWindow* window, 186 void ProcessWindowHierarchyChanged(const ServerWindow* window,
190 const ServerWindow* new_parent, 187 const ServerWindow* new_parent,
191 const ServerWindow* old_parent); 188 const ServerWindow* old_parent);
192 void ProcessWindowReorder(const ServerWindow* window, 189 void ProcessWindowReorder(const ServerWindow* window,
193 const ServerWindow* relative_window, 190 const ServerWindow* relative_window,
194 const mojom::OrderDirection direction); 191 const mojom::OrderDirection direction);
195 void ProcessWindowDeleted(ServerWindow* window); 192 void ProcessWindowDeleted(ServerWindow* window);
196 void ProcessWillChangeWindowPredefinedCursor(ServerWindow* window, 193 void ProcessWillChangeWindowPredefinedCursor(ServerWindow* window,
197 mojom::Cursor cursor_id); 194 mojom::Cursor cursor_id);
198 void ProcessWindowSurfaceCreated(ServerWindow* window, 195 void ProcessWindowSurfaceCreated(
199 mojom::CompositorFrameSinkType surface_type, 196 ServerWindow* window,
200 const cc::SurfaceId& surface_id, 197 mojom::CompositorFrameSinkType compositor_frame_sink_type,
201 const gfx::Size& frame_size, 198 const cc::SurfaceId& surface_id,
202 float device_scale_factor); 199 const gfx::Size& frame_size,
200 float device_scale_factor);
203 201
204 // Sends an |event| to all WindowTrees belonging to |user_id| that might be 202 // Sends an |event| to all WindowTrees belonging to |user_id| that might be
205 // observing events. Skips |ignore_tree| if it is non-null. |target_window| is 203 // observing events. Skips |ignore_tree| if it is non-null. |target_window| is
206 // the target of the event. 204 // the target of the event.
207 void SendToPointerWatchers(const ui::Event& event, 205 void SendToPointerWatchers(const ui::Event& event,
208 const UserId& user_id, 206 const UserId& user_id,
209 ServerWindow* target_window, 207 ServerWindow* target_window,
210 WindowTree* ignore_tree); 208 WindowTree* ignore_tree);
211 209
212 // Sets a callback to be called whenever a ServerWindow is scheduled for 210 // Sets a callback to be called whenever a ServerWindow is scheduled for
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 void UpdateNativeCursorFromMouseLocation(ServerWindow* window); 285 void UpdateNativeCursorFromMouseLocation(ServerWindow* window);
288 286
289 // Updates the native cursor if the cursor is currently inside |window|. This 287 // Updates the native cursor if the cursor is currently inside |window|. This
290 // is run in response to events that change the mouse cursor properties of 288 // is run in response to events that change the mouse cursor properties of
291 // |window|. 289 // |window|.
292 void UpdateNativeCursorIfOver(ServerWindow* window); 290 void UpdateNativeCursorIfOver(ServerWindow* window);
293 291
294 bool IsUserInHighContrastMode(const UserId& user) const; 292 bool IsUserInHighContrastMode(const UserId& user) const;
295 293
296 // Overridden from ServerWindowDelegate: 294 // Overridden from ServerWindowDelegate:
297 void OnScheduleWindowPaint(ServerWindow* window) override; 295 ServerWindow* GetRootWindow(const ServerWindow* window) override;
298 const ServerWindow* GetRootWindow(const ServerWindow* window) const override;
299 296
300 // Overridden from ServerWindowObserver: 297 // Overridden from ServerWindowObserver:
301 void OnWindowDestroyed(ServerWindow* window) override; 298 void OnWindowDestroyed(ServerWindow* window) override;
302 void OnWillChangeWindowHierarchy(ServerWindow* window, 299 void OnWillChangeWindowHierarchy(ServerWindow* window,
303 ServerWindow* new_parent, 300 ServerWindow* new_parent,
304 ServerWindow* old_parent) override; 301 ServerWindow* old_parent) override;
305 void OnWindowHierarchyChanged(ServerWindow* window, 302 void OnWindowHierarchyChanged(ServerWindow* window,
306 ServerWindow* new_parent, 303 ServerWindow* new_parent,
307 ServerWindow* old_parent) override; 304 ServerWindow* old_parent) override;
308 void OnWindowBoundsChanged(ServerWindow* window, 305 void OnWindowBoundsChanged(ServerWindow* window,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 std::map<UserId, bool> high_contrast_mode_; 370 std::map<UserId, bool> high_contrast_mode_;
374 371
375 // Maps from window manager change id to the client that initiated the 372 // Maps from window manager change id to the client that initiated the
376 // request. 373 // request.
377 InFlightWindowManagerChangeMap in_flight_wm_change_map_; 374 InFlightWindowManagerChangeMap in_flight_wm_change_map_;
378 375
379 // Next id supplied to the window manager. 376 // Next id supplied to the window manager.
380 uint32_t next_wm_change_id_; 377 uint32_t next_wm_change_id_;
381 378
382 std::unique_ptr<GpuServiceProxy> gpu_proxy_; 379 std::unique_ptr<GpuServiceProxy> gpu_proxy_;
380 // TODO(fsamuel): The window server should not have a GPU channel.
383 scoped_refptr<gpu::GpuChannelHost> gpu_channel_; 381 scoped_refptr<gpu::GpuChannelHost> gpu_channel_;
384 base::Callback<void(ServerWindow*)> window_paint_callback_; 382 base::Callback<void(ServerWindow*)> window_paint_callback_;
385 383
386 UserActivityMonitorMap activity_monitor_map_; 384 UserActivityMonitorMap activity_monitor_map_;
387 385
388 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_; 386 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_;
389 387
390 mojo::Binding<cc::mojom::DisplayCompositorClient> 388 mojo::Binding<cc::mojom::DisplayCompositorClient>
391 display_compositor_client_binding_; 389 display_compositor_client_binding_;
392 // State for rendering into a Surface. 390 // State for rendering into a Surface.
393 scoped_refptr<ui::DisplayCompositor> display_compositor_; 391 scoped_refptr<ui::DisplayCompositor> display_compositor_;
394 392
395 DISALLOW_COPY_AND_ASSIGN(WindowServer); 393 DISALLOW_COPY_AND_ASSIGN(WindowServer);
396 }; 394 };
397 395
398 } // namespace ws 396 } // namespace ws
399 } // namespace ui 397 } // namespace ui
400 398
401 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_ 399 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_
OLDNEW
« no previous file with comments | « services/ui/ws/test_utils.cc ('k') | services/ui/ws/window_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698