| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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::CreateCompositorFrameSink( | 86 void ServerWindow::CreateCompositorFrameSink( |
| 87 mojom::CompositorFrameSinkType compositor_frame_sink_type, | 87 mojom::CompositorFrameSinkType compositor_frame_sink_type, |
| 88 gfx::AcceleratedWidget widget, | 88 gfx::AcceleratedWidget widget, |
| 89 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | |
| 90 scoped_refptr<SurfacesContextProvider> context_provider, | |
| 91 cc::mojom::MojoCompositorFrameSinkRequest request, | 89 cc::mojom::MojoCompositorFrameSinkRequest request, |
| 92 cc::mojom::MojoCompositorFrameSinkClientPtr client) { | 90 cc::mojom::MojoCompositorFrameSinkClientPtr client) { |
| 93 GetOrCreateCompositorFrameSinkManager()->CreateCompositorFrameSink( | 91 GetOrCreateCompositorFrameSinkManager()->CreateCompositorFrameSink( |
| 94 compositor_frame_sink_type, widget, gpu_memory_buffer_manager, | 92 compositor_frame_sink_type, widget, std::move(request), |
| 95 std::move(context_provider), std::move(request), std::move(client)); | 93 std::move(client)); |
| 96 } | 94 } |
| 97 | 95 |
| 98 void ServerWindow::Add(ServerWindow* child) { | 96 void ServerWindow::Add(ServerWindow* child) { |
| 99 // We assume validation checks happened already. | 97 // We assume validation checks happened already. |
| 100 DCHECK(child); | 98 DCHECK(child); |
| 101 DCHECK(child != this); | 99 DCHECK(child != this); |
| 102 DCHECK(!child->Contains(this)); | 100 DCHECK(!child->Contains(this)); |
| 103 if (child->parent() == this) { | 101 if (child->parent() == this) { |
| 104 if (children_.size() == 1) | 102 if (children_.size() == 1) |
| 105 return; // Already in the right position. | 103 return; // Already in the right position. |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 } | 456 } |
| 459 | 457 |
| 460 // static | 458 // static |
| 461 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { | 459 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { |
| 462 return &window->stacking_target_; | 460 return &window->stacking_target_; |
| 463 } | 461 } |
| 464 | 462 |
| 465 } // namespace ws | 463 } // namespace ws |
| 466 | 464 |
| 467 } // namespace ui | 465 } // namespace ui |
| OLD | NEW |