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

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

Issue 2346253004: Makes display roots be destroyed by client (Closed)
Patch Set: cleanup Created 4 years, 3 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
« no previous file with comments | « services/ui/ws/window_server.cc ('k') | services/ui/ws/window_tree.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_TREE_H_ 5 #ifndef SERVICES_UI_WS_WINDOW_TREE_H_
6 #define SERVICES_UI_WS_WINDOW_TREE_H_ 6 #define SERVICES_UI_WS_WINDOW_TREE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // These functions are synchronous variants of those defined in the mojom. The 160 // These functions are synchronous variants of those defined in the mojom. The
161 // WindowTree implementations all call into these. See the mojom for details. 161 // WindowTree implementations all call into these. See the mojom for details.
162 bool SetCapture(const ClientWindowId& client_window_id); 162 bool SetCapture(const ClientWindowId& client_window_id);
163 bool ReleaseCapture(const ClientWindowId& client_window_id); 163 bool ReleaseCapture(const ClientWindowId& client_window_id);
164 bool NewWindow(const ClientWindowId& client_window_id, 164 bool NewWindow(const ClientWindowId& client_window_id,
165 const std::map<std::string, std::vector<uint8_t>>& properties); 165 const std::map<std::string, std::vector<uint8_t>>& properties);
166 bool AddWindow(const ClientWindowId& parent_id, 166 bool AddWindow(const ClientWindowId& parent_id,
167 const ClientWindowId& child_id); 167 const ClientWindowId& child_id);
168 bool AddTransientWindow(const ClientWindowId& window_id, 168 bool AddTransientWindow(const ClientWindowId& window_id,
169 const ClientWindowId& transient_window_id); 169 const ClientWindowId& transient_window_id);
170 bool DeleteWindow(const ClientWindowId& window_id);
170 bool SetModal(const ClientWindowId& window_id); 171 bool SetModal(const ClientWindowId& window_id);
171 std::vector<const ServerWindow*> GetWindowTree( 172 std::vector<const ServerWindow*> GetWindowTree(
172 const ClientWindowId& window_id) const; 173 const ClientWindowId& window_id) const;
173 bool SetWindowVisibility(const ClientWindowId& window_id, bool visible); 174 bool SetWindowVisibility(const ClientWindowId& window_id, bool visible);
174 bool SetWindowOpacity(const ClientWindowId& window_id, float opacity); 175 bool SetWindowOpacity(const ClientWindowId& window_id, float opacity);
175 bool SetFocus(const ClientWindowId& window_id); 176 bool SetFocus(const ClientWindowId& window_id);
176 bool Embed(const ClientWindowId& window_id, 177 bool Embed(const ClientWindowId& window_id,
177 mojom::WindowTreeClientPtr client, 178 mojom::WindowTreeClientPtr client,
178 uint32_t flags); 179 uint32_t flags);
179 void DispatchInputEvent(ServerWindow* target, const ui::Event& event); 180 void DispatchInputEvent(ServerWindow* target, const ui::Event& event);
180 181
181 bool IsWaitingForNewTopLevelWindow(uint32_t wm_change_id); 182 bool IsWaitingForNewTopLevelWindow(uint32_t wm_change_id);
182 void OnWindowManagerCreatedTopLevelWindow(uint32_t wm_change_id, 183 void OnWindowManagerCreatedTopLevelWindow(uint32_t wm_change_id,
183 uint32_t client_change_id, 184 uint32_t client_change_id,
184 const ServerWindow* window); 185 const ServerWindow* window);
185 void AddActivationParent(const ClientWindowId& window_id); 186 void AddActivationParent(const ClientWindowId& window_id);
186 187
187 // Calls through to the client. 188 // Calls through to the client.
188 void OnChangeCompleted(uint32_t change_id, bool success); 189 void OnChangeCompleted(uint32_t change_id, bool success);
189 // |state_to_ack| is the WindowManagerState to call through to when the ack 190 // |state_to_ack| is the WindowManagerState to call through to when the ack
190 // from the accelerator is received. If |needs_ack| is true an ack is 191 // from the accelerator is received. If |needs_ack| is true an ack is
191 // required. 192 // required.
192 void OnAccelerator(uint32_t accelerator_id, 193 void OnAccelerator(uint32_t accelerator_id,
193 const ui::Event& event, 194 const ui::Event& event,
194 bool needs_ack); 195 bool needs_ack);
195 196
197 // Called when a display has been removed. This is only called on the
198 // WindowTree associated with a WindowManager.
199 void OnDisplayDestroying(int64_t display_id);
200
196 // Called when |tree|'s jankiness changes (see janky_ for definition). 201 // Called when |tree|'s jankiness changes (see janky_ for definition).
197 // Notifies the window manager client so it can update UI for the affected 202 // Notifies the window manager client so it can update UI for the affected
198 // window(s). 203 // window(s).
199 void ClientJankinessChanged(WindowTree* tree); 204 void ClientJankinessChanged(WindowTree* tree);
200 205
201 // The following methods are invoked after the corresponding change has been 206 // The following methods are invoked after the corresponding change has been
202 // processed. They do the appropriate bookkeeping and update the client as 207 // processed. They do the appropriate bookkeeping and update the client as
203 // necessary. 208 // necessary.
204 void ProcessWindowBoundsChanged(const ServerWindow* window, 209 void ProcessWindowBoundsChanged(const ServerWindow* window,
205 const gfx::Rect& old_bounds, 210 const gfx::Rect& old_bounds,
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 waiting_for_top_level_window_info_; 563 waiting_for_top_level_window_info_;
559 bool embedder_intercepts_events_ = false; 564 bool embedder_intercepts_events_ = false;
560 565
561 DISALLOW_COPY_AND_ASSIGN(WindowTree); 566 DISALLOW_COPY_AND_ASSIGN(WindowTree);
562 }; 567 };
563 568
564 } // namespace ws 569 } // namespace ws
565 } // namespace ui 570 } // namespace ui
566 571
567 #endif // SERVICES_UI_WS_WINDOW_TREE_H_ 572 #endif // SERVICES_UI_WS_WINDOW_TREE_H_
OLDNEW
« no previous file with comments | « services/ui/ws/window_server.cc ('k') | services/ui/ws/window_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698