| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ui/aura/mus/window_port_mus.h" | 5 #include "ui/aura/mus/window_port_mus.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "ui/aura/client/aura_constants.h" | 8 #include "ui/aura/client/aura_constants.h" |
| 9 #include "ui/aura/client/transient_window_client.h" | 9 #include "ui/aura/client/transient_window_client.h" |
| 10 #include "ui/aura/mus/client_surface_embedder.h" | 10 #include "ui/aura/mus/client_surface_embedder.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 window_tree_client_->Embed(window_, std::move(client), flags, callback); | 73 window_tree_client_->Embed(window_, std::move(client), flags, callback); |
| 74 } | 74 } |
| 75 | 75 |
| 76 std::unique_ptr<WindowCompositorFrameSink> | 76 std::unique_ptr<WindowCompositorFrameSink> |
| 77 WindowPortMus::RequestCompositorFrameSink( | 77 WindowPortMus::RequestCompositorFrameSink( |
| 78 scoped_refptr<cc::ContextProvider> context_provider, | 78 scoped_refptr<cc::ContextProvider> context_provider, |
| 79 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) { | 79 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) { |
| 80 std::unique_ptr<WindowCompositorFrameSinkBinding> | 80 std::unique_ptr<WindowCompositorFrameSinkBinding> |
| 81 compositor_frame_sink_binding; | 81 compositor_frame_sink_binding; |
| 82 std::unique_ptr<WindowCompositorFrameSink> compositor_frame_sink = | 82 std::unique_ptr<WindowCompositorFrameSink> compositor_frame_sink = |
| 83 WindowCompositorFrameSink::Create(std::move(context_provider), | 83 WindowCompositorFrameSink::Create( |
| 84 gpu_memory_buffer_manager, | 84 cc::FrameSinkId(server_id(), 0), std::move(context_provider), |
| 85 &compositor_frame_sink_binding); | 85 gpu_memory_buffer_manager, &compositor_frame_sink_binding); |
| 86 AttachCompositorFrameSink(std::move(compositor_frame_sink_binding)); | 86 AttachCompositorFrameSink(std::move(compositor_frame_sink_binding)); |
| 87 return compositor_frame_sink; | 87 return compositor_frame_sink; |
| 88 } | 88 } |
| 89 | 89 |
| 90 void WindowPortMus::AttachCompositorFrameSink( | 90 void WindowPortMus::AttachCompositorFrameSink( |
| 91 std::unique_ptr<WindowCompositorFrameSinkBinding> | 91 std::unique_ptr<WindowCompositorFrameSinkBinding> |
| 92 compositor_frame_sink_binding) { | 92 compositor_frame_sink_binding) { |
| 93 window_tree_client_->AttachCompositorFrameSink( | 93 window_tree_client_->AttachCompositorFrameSink( |
| 94 server_id(), | 94 server_id(), |
| 95 std::move(compositor_frame_sink_binding->compositor_frame_sink_request_), | 95 std::move(compositor_frame_sink_binding->compositor_frame_sink_request_), |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 change_data.property_name = | 429 change_data.property_name = |
| 430 GetPropertyConverter()->GetTransportNameForPropertyKey(key); | 430 GetPropertyConverter()->GetTransportNameForPropertyKey(key); |
| 431 // TODO(sky): investigate to see if we need to compare data. In particular do | 431 // TODO(sky): investigate to see if we need to compare data. In particular do |
| 432 // we ever have a case where changing a property cascades into changing the | 432 // we ever have a case where changing a property cascades into changing the |
| 433 // same property? | 433 // same property? |
| 434 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data)) | 434 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data)) |
| 435 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data)); | 435 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data)); |
| 436 } | 436 } |
| 437 | 437 |
| 438 } // namespace aura | 438 } // namespace aura |
| OLD | NEW |