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 #include "services/ui/ws/server_window.h" | 5 #include "services/ui/ws/server_window.h" |
6 | 6 |
7 #include <inttypes.h> | 7 #include <inttypes.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 void ServerWindow::RemoveObserver(ServerWindowObserver* observer) { | 77 void ServerWindow::RemoveObserver(ServerWindowObserver* observer) { |
78 DCHECK(observers_.HasObserver(observer)); | 78 DCHECK(observers_.HasObserver(observer)); |
79 observers_.RemoveObserver(observer); | 79 observers_.RemoveObserver(observer); |
80 } | 80 } |
81 | 81 |
82 bool ServerWindow::HasObserver(ServerWindowObserver* observer) { | 82 bool ServerWindow::HasObserver(ServerWindowObserver* observer) { |
83 return observers_.HasObserver(observer); | 83 return observers_.HasObserver(observer); |
84 } | 84 } |
85 | 85 |
86 void ServerWindow::CreateSurface(mojom::SurfaceType surface_type, | 86 void ServerWindow::CreateSurface( |
87 mojo::InterfaceRequest<mojom::Surface> request, | 87 mojom::SurfaceType surface_type, |
88 mojom::SurfaceClientPtr client) { | 88 mojo::InterfaceRequest<cc::mojom::MojoCompositorFrameSink> request, |
| 89 cc::mojom::MojoCompositorFrameSinkClientPtr client) { |
89 GetOrCreateSurfaceManager()->CreateSurface(surface_type, std::move(request), | 90 GetOrCreateSurfaceManager()->CreateSurface(surface_type, std::move(request), |
90 std::move(client)); | 91 std::move(client)); |
91 } | 92 } |
92 | 93 |
93 void ServerWindow::Add(ServerWindow* child) { | 94 void ServerWindow::Add(ServerWindow* child) { |
94 // We assume validation checks happened already. | 95 // We assume validation checks happened already. |
95 DCHECK(child); | 96 DCHECK(child); |
96 DCHECK(child != this); | 97 DCHECK(child != this); |
97 DCHECK(!child->Contains(this)); | 98 DCHECK(!child->Contains(this)); |
98 if (child->parent() == this) { | 99 if (child->parent() == this) { |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 } | 455 } |
455 | 456 |
456 // static | 457 // static |
457 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { | 458 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { |
458 return &window->stacking_target_; | 459 return &window->stacking_target_; |
459 } | 460 } |
460 | 461 |
461 } // namespace ws | 462 } // namespace ws |
462 | 463 |
463 } // namespace ui | 464 } // namespace ui |
OLD | NEW |