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

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

Issue 2710023007: Make WindowTree::SetModal() take the type. (Closed)
Patch Set: Fix compile error. Created 3 years, 9 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_SERVER_WINDOW_H_ 5 #ifndef SERVICES_UI_WS_SERVER_WINDOW_H_
6 #define SERVICES_UI_WS_SERVER_WINDOW_H_ 6 #define SERVICES_UI_WS_SERVER_WINDOW_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // Transient window management. 124 // Transient window management.
125 // Adding transient child fails if the child window is modal to system. 125 // Adding transient child fails if the child window is modal to system.
126 bool AddTransientWindow(ServerWindow* child); 126 bool AddTransientWindow(ServerWindow* child);
127 void RemoveTransientWindow(ServerWindow* child); 127 void RemoveTransientWindow(ServerWindow* child);
128 128
129 ServerWindow* transient_parent() { return transient_parent_; } 129 ServerWindow* transient_parent() { return transient_parent_; }
130 const ServerWindow* transient_parent() const { return transient_parent_; } 130 const ServerWindow* transient_parent() const { return transient_parent_; }
131 131
132 const Windows& transient_children() const { return transient_children_; } 132 const Windows& transient_children() const { return transient_children_; }
133 133
134 bool is_modal() const { return is_modal_; } 134 bool is_modal() const { return modal_type_ != MODAL_TYPE_NONE; }
135 void SetModal(); 135 void SetModal(ModalType modal_type);
sky 2017/03/01 00:13:34 SetModalType
Hadi 2017/03/06 20:07:05 Done. Also changed WindowTree::SetModal() to Windo
136 136
137 // Returns true if this contains |window| or is |window|. 137 // Returns true if this contains |window| or is |window|.
138 bool Contains(const ServerWindow* window) const; 138 bool Contains(const ServerWindow* window) const;
139 139
140 // Returns the visibility requested by this window. IsDrawn() returns whether 140 // Returns the visibility requested by this window. IsDrawn() returns whether
141 // the window is actually visible on screen. 141 // the window is actually visible on screen.
142 bool visible() const { return visible_; } 142 bool visible() const { return visible_; }
143 void SetVisible(bool value); 143 void SetVisible(bool value);
144 144
145 float opacity() const { return opacity_; } 145 float opacity() const { return opacity_; }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 ServerWindow* parent_; 230 ServerWindow* parent_;
231 Windows children_; 231 Windows children_;
232 232
233 // Transient window management. 233 // Transient window management.
234 // If non-null we're actively restacking transient as the result of a 234 // If non-null we're actively restacking transient as the result of a
235 // transient ancestor changing. 235 // transient ancestor changing.
236 ServerWindow* stacking_target_; 236 ServerWindow* stacking_target_;
237 ServerWindow* transient_parent_; 237 ServerWindow* transient_parent_;
238 Windows transient_children_; 238 Windows transient_children_;
239 239
240 bool is_modal_; 240 ModalType modal_type_;
241 bool visible_; 241 bool visible_;
242 gfx::Rect bounds_; 242 gfx::Rect bounds_;
243 gfx::Insets client_area_; 243 gfx::Insets client_area_;
244 std::vector<gfx::Rect> additional_client_areas_; 244 std::vector<gfx::Rect> additional_client_areas_;
245 std::unique_ptr<ServerWindowCompositorFrameSinkManager> 245 std::unique_ptr<ServerWindowCompositorFrameSinkManager>
246 compositor_frame_sink_manager_; 246 compositor_frame_sink_manager_;
247 mojom::Cursor cursor_id_; 247 mojom::Cursor cursor_id_;
248 mojom::Cursor non_client_cursor_id_; 248 mojom::Cursor non_client_cursor_id_;
249 float opacity_; 249 float opacity_;
250 bool can_focus_; 250 bool can_focus_;
(...skipping 20 matching lines...) Expand all
271 271
272 base::ObserverList<ServerWindowObserver> observers_; 272 base::ObserverList<ServerWindowObserver> observers_;
273 273
274 DISALLOW_COPY_AND_ASSIGN(ServerWindow); 274 DISALLOW_COPY_AND_ASSIGN(ServerWindow);
275 }; 275 };
276 276
277 } // namespace ws 277 } // namespace ws
278 } // namespace ui 278 } // namespace ui
279 279
280 #endif // SERVICES_UI_WS_SERVER_WINDOW_H_ 280 #endif // SERVICES_UI_WS_SERVER_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698