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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 window_tree_client_->SetEventTargetingPolicy(this, policy); | 71 window_tree_client_->SetEventTargetingPolicy(this, policy); |
72 } | 72 } |
73 | 73 |
74 void WindowPortMus::Embed( | 74 void WindowPortMus::Embed( |
75 ui::mojom::WindowTreeClientPtr client, | 75 ui::mojom::WindowTreeClientPtr client, |
76 uint32_t flags, | 76 uint32_t flags, |
77 const ui::mojom::WindowTree::EmbedCallback& callback) { | 77 const ui::mojom::WindowTree::EmbedCallback& callback) { |
78 window_tree_client_->Embed(window_, std::move(client), flags, callback); | 78 window_tree_client_->Embed(window_, std::move(client), flags, callback); |
79 } | 79 } |
80 | 80 |
81 std::unique_ptr<ui::WindowCompositorFrameSink> | 81 std::unique_ptr<ui::ClientCompositorFrameSink> |
82 WindowPortMus::RequestCompositorFrameSink( | 82 WindowPortMus::RequestCompositorFrameSink( |
83 scoped_refptr<cc::ContextProvider> context_provider, | 83 scoped_refptr<cc::ContextProvider> context_provider, |
84 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) { | 84 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) { |
85 std::unique_ptr<ui::WindowCompositorFrameSinkBinding> | 85 std::unique_ptr<ui::ClientCompositorFrameSinkBinding> |
86 compositor_frame_sink_binding; | 86 compositor_frame_sink_binding; |
87 std::unique_ptr<ui::WindowCompositorFrameSink> compositor_frame_sink = | 87 std::unique_ptr<ui::ClientCompositorFrameSink> compositor_frame_sink = |
88 ui::WindowCompositorFrameSink::Create( | 88 ui::ClientCompositorFrameSink::Create( |
89 cc::FrameSinkId(server_id(), 0), std::move(context_provider), | 89 cc::FrameSinkId(server_id(), 0), std::move(context_provider), |
90 gpu_memory_buffer_manager, &compositor_frame_sink_binding); | 90 gpu_memory_buffer_manager, &compositor_frame_sink_binding); |
91 AttachCompositorFrameSink(std::move(compositor_frame_sink_binding)); | 91 AttachCompositorFrameSink(std::move(compositor_frame_sink_binding)); |
92 return compositor_frame_sink; | 92 return compositor_frame_sink; |
93 } | 93 } |
94 | 94 |
95 void WindowPortMus::AttachCompositorFrameSink( | 95 void WindowPortMus::AttachCompositorFrameSink( |
96 std::unique_ptr<ui::WindowCompositorFrameSinkBinding> | 96 std::unique_ptr<ui::ClientCompositorFrameSinkBinding> |
97 compositor_frame_sink_binding) { | 97 compositor_frame_sink_binding) { |
98 window_tree_client_->AttachCompositorFrameSink( | 98 window_tree_client_->AttachCompositorFrameSink( |
99 server_id(), compositor_frame_sink_binding->TakeFrameSinkRequest(), | 99 server_id(), compositor_frame_sink_binding->TakeFrameSinkRequest(), |
100 mojo::MakeProxy(compositor_frame_sink_binding->TakeFrameSinkClient())); | 100 mojo::MakeProxy(compositor_frame_sink_binding->TakeFrameSinkClient())); |
101 } | 101 } |
102 | 102 |
103 WindowPortMus::ServerChangeIdType WindowPortMus::ScheduleChange( | 103 WindowPortMus::ServerChangeIdType WindowPortMus::ScheduleChange( |
104 const ServerChangeType type, | 104 const ServerChangeType type, |
105 const ServerChangeData& data) { | 105 const ServerChangeData& data) { |
106 ServerChange change; | 106 ServerChange change; |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 change_data.property_name = | 441 change_data.property_name = |
442 GetPropertyConverter()->GetTransportNameForPropertyKey(key); | 442 GetPropertyConverter()->GetTransportNameForPropertyKey(key); |
443 // TODO(sky): investigate to see if we need to compare data. In particular do | 443 // TODO(sky): investigate to see if we need to compare data. In particular do |
444 // we ever have a case where changing a property cascades into changing the | 444 // we ever have a case where changing a property cascades into changing the |
445 // same property? | 445 // same property? |
446 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data)) | 446 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data)) |
447 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data)); | 447 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data)); |
448 } | 448 } |
449 | 449 |
450 } // namespace aura | 450 } // namespace aura |
OLD | NEW |