| 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_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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 cc::mojom::MojoCompositorFrameSinkAssociatedRequest sink_request, | 65 cc::mojom::MojoCompositorFrameSinkAssociatedRequest sink_request, |
| 66 cc::mojom::MojoCompositorFrameSinkClientPtr client, | 66 cc::mojom::MojoCompositorFrameSinkClientPtr client, |
| 67 cc::mojom::DisplayPrivateAssociatedRequest display_request); | 67 cc::mojom::DisplayPrivateAssociatedRequest display_request); |
| 68 | 68 |
| 69 void CreateCompositorFrameSink( | 69 void CreateCompositorFrameSink( |
| 70 cc::mojom::MojoCompositorFrameSinkRequest request, | 70 cc::mojom::MojoCompositorFrameSinkRequest request, |
| 71 cc::mojom::MojoCompositorFrameSinkClientPtr client); | 71 cc::mojom::MojoCompositorFrameSinkClientPtr client); |
| 72 | 72 |
| 73 const WindowId& id() const { return id_; } | 73 const WindowId& id() const { return id_; } |
| 74 | 74 |
| 75 const cc::FrameSinkId& frame_sink_id() const { return frame_sink_id_; } |
| 76 |
| 75 void Add(ServerWindow* child); | 77 void Add(ServerWindow* child); |
| 76 void Remove(ServerWindow* child); | 78 void Remove(ServerWindow* child); |
| 77 void Reorder(ServerWindow* relative, mojom::OrderDirection diretion); | 79 void Reorder(ServerWindow* relative, mojom::OrderDirection diretion); |
| 78 void StackChildAtBottom(ServerWindow* child); | 80 void StackChildAtBottom(ServerWindow* child); |
| 79 void StackChildAtTop(ServerWindow* child); | 81 void StackChildAtTop(ServerWindow* child); |
| 80 | 82 |
| 81 const gfx::Rect& bounds() const { return bounds_; } | 83 const gfx::Rect& bounds() const { return bounds_; } |
| 82 // Sets the bounds. If the size changes this implicitly resets the client | 84 // Sets the bounds. If the size changes this implicitly resets the client |
| 83 // area to fill the whole bounds. | 85 // area to fill the whole bounds. |
| 84 void SetBounds(const gfx::Rect& bounds); | 86 void SetBounds(const gfx::Rect& bounds); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) | 206 #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) |
| 205 std::string GetDebugWindowHierarchy() const; | 207 std::string GetDebugWindowHierarchy() const; |
| 206 std::string GetDebugWindowInfo() const; | 208 std::string GetDebugWindowInfo() const; |
| 207 void BuildDebugInfo(const std::string& depth, std::string* result) const; | 209 void BuildDebugInfo(const std::string& depth, std::string* result) const; |
| 208 #endif | 210 #endif |
| 209 | 211 |
| 210 private: | 212 private: |
| 211 // Implementation of removing a window. Doesn't send any notification. | 213 // Implementation of removing a window. Doesn't send any notification. |
| 212 void RemoveImpl(ServerWindow* window); | 214 void RemoveImpl(ServerWindow* window); |
| 213 | 215 |
| 214 // Called when the root window changes from |old_root| to |new_root|. This is | |
| 215 // called after the window is moved from |old_root| to |new_root|. | |
| 216 void ProcessRootChanged(ServerWindow* old_root, ServerWindow* new_root); | |
| 217 | |
| 218 // Called when this window's stacking order among its siblings is changed. | 216 // Called when this window's stacking order among its siblings is changed. |
| 219 void OnStackingChanged(); | 217 void OnStackingChanged(); |
| 220 | 218 |
| 221 static void ReorderImpl(ServerWindow* window, | 219 static void ReorderImpl(ServerWindow* window, |
| 222 ServerWindow* relative, | 220 ServerWindow* relative, |
| 223 mojom::OrderDirection diretion); | 221 mojom::OrderDirection diretion); |
| 224 | 222 |
| 225 // Returns a pointer to the stacking target that can be used by | 223 // Returns a pointer to the stacking target that can be used by |
| 226 // RestackTransientDescendants. | 224 // RestackTransientDescendants. |
| 227 static ServerWindow** GetStackingTarget(ServerWindow* window); | 225 static ServerWindow** GetStackingTarget(ServerWindow* window); |
| 228 | 226 |
| 229 ServerWindowDelegate* delegate_; | 227 ServerWindowDelegate* delegate_; |
| 230 const WindowId id_; | 228 const WindowId id_; |
| 229 cc::FrameSinkId frame_sink_id_; |
| 231 ServerWindow* parent_; | 230 ServerWindow* parent_; |
| 232 Windows children_; | 231 Windows children_; |
| 233 | 232 |
| 234 // Transient window management. | 233 // Transient window management. |
| 235 // 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 |
| 236 // transient ancestor changing. | 235 // transient ancestor changing. |
| 237 ServerWindow* stacking_target_; | 236 ServerWindow* stacking_target_; |
| 238 ServerWindow* transient_parent_; | 237 ServerWindow* transient_parent_; |
| 239 Windows transient_children_; | 238 Windows transient_children_; |
| 240 | 239 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 271 |
| 273 base::ObserverList<ServerWindowObserver> observers_; | 272 base::ObserverList<ServerWindowObserver> observers_; |
| 274 | 273 |
| 275 DISALLOW_COPY_AND_ASSIGN(ServerWindow); | 274 DISALLOW_COPY_AND_ASSIGN(ServerWindow); |
| 276 }; | 275 }; |
| 277 | 276 |
| 278 } // namespace ws | 277 } // namespace ws |
| 279 } // namespace ui | 278 } // namespace ui |
| 280 | 279 |
| 281 #endif // SERVICES_UI_WS_SERVER_WINDOW_H_ | 280 #endif // SERVICES_UI_WS_SERVER_WINDOW_H_ |
| OLD | NEW |