| 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/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 gfx::AcceleratedWidget widget, | 87 gfx::AcceleratedWidget widget, |
| 88 cc::mojom::MojoCompositorFrameSinkRequest request, | 88 cc::mojom::MojoCompositorFrameSinkRequest request, |
| 89 cc::mojom::MojoCompositorFrameSinkClientPtr client, | 89 cc::mojom::MojoCompositorFrameSinkClientPtr client, |
| 90 cc::mojom::DisplayPrivateRequest display_private_request) { | 90 cc::mojom::DisplayPrivateRequest display_private_request) { |
| 91 GetOrCreateCompositorFrameSinkManager()->CreateDisplayCompositorFrameSink( | 91 GetOrCreateCompositorFrameSinkManager()->CreateDisplayCompositorFrameSink( |
| 92 widget, std::move(request), std::move(client), | 92 widget, std::move(request), std::move(client), |
| 93 std::move(display_private_request)); | 93 std::move(display_private_request)); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void ServerWindow::CreateOffscreenCompositorFrameSink( | 96 void ServerWindow::CreateOffscreenCompositorFrameSink( |
| 97 mojom::CompositorFrameSinkType compositor_frame_sink_type, | |
| 98 cc::mojom::MojoCompositorFrameSinkRequest request, | 97 cc::mojom::MojoCompositorFrameSinkRequest request, |
| 99 cc::mojom::MojoCompositorFrameSinkClientPtr client) { | 98 cc::mojom::MojoCompositorFrameSinkClientPtr client) { |
| 100 GetOrCreateCompositorFrameSinkManager()->CreateOffscreenCompositorFrameSink( | 99 GetOrCreateCompositorFrameSinkManager()->CreateOffscreenCompositorFrameSink( |
| 101 compositor_frame_sink_type, std::move(request), std::move(client)); | 100 std::move(request), std::move(client)); |
| 102 } | 101 } |
| 103 | 102 |
| 104 void ServerWindow::Add(ServerWindow* child) { | 103 void ServerWindow::Add(ServerWindow* child) { |
| 105 // We assume validation checks happened already. | 104 // We assume validation checks happened already. |
| 106 DCHECK(child); | 105 DCHECK(child); |
| 107 DCHECK(child != this); | 106 DCHECK(child != this); |
| 108 DCHECK(!child->Contains(this)); | 107 DCHECK(!child->Contains(this)); |
| 109 if (child->parent() == this) { | 108 if (child->parent() == this) { |
| 110 if (children_.size() == 1) | 109 if (children_.size() == 1) |
| 111 return; // Already in the right position. | 110 return; // Already in the right position. |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 window->OnStackingChanged(); | 476 window->OnStackingChanged(); |
| 478 } | 477 } |
| 479 | 478 |
| 480 // static | 479 // static |
| 481 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { | 480 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { |
| 482 return &window->stacking_target_; | 481 return &window->stacking_target_; |
| 483 } | 482 } |
| 484 | 483 |
| 485 } // namespace ws | 484 } // namespace ws |
| 486 } // namespace ui | 485 } // namespace ui |
| OLD | NEW |