| 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 "ui/aura/client/aura_constants.h" | 7 #include "ui/aura/client/aura_constants.h" |
| 8 #include "ui/aura/client/transient_window_client.h" | 8 #include "ui/aura/client/transient_window_client.h" |
| 9 #include "ui/aura/mus/property_converter.h" | 9 #include "ui/aura/mus/property_converter.h" |
| 10 #include "ui/aura/mus/surface_id_handler.h" | 10 #include "ui/aura/mus/surface_id_handler.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 } | 58 } |
| 59 | 59 |
| 60 void WindowPortMus::SetPredefinedCursor(ui::mojom::Cursor cursor_id) { | 60 void WindowPortMus::SetPredefinedCursor(ui::mojom::Cursor cursor_id) { |
| 61 if (cursor_id == predefined_cursor_) | 61 if (cursor_id == predefined_cursor_) |
| 62 return; | 62 return; |
| 63 | 63 |
| 64 window_tree_client_->SetPredefinedCursor(this, predefined_cursor_, cursor_id); | 64 window_tree_client_->SetPredefinedCursor(this, predefined_cursor_, cursor_id); |
| 65 predefined_cursor_ = cursor_id; | 65 predefined_cursor_ = cursor_id; |
| 66 } | 66 } |
| 67 | 67 |
| 68 void WindowPortMus::Embed( |
| 69 ui::mojom::WindowTreeClientPtr client, |
| 70 uint32_t flags, |
| 71 const ui::mojom::WindowTree::EmbedCallback& callback) { |
| 72 window_tree_client_->Embed(window_, std::move(client), flags, callback); |
| 73 } |
| 74 |
| 68 std::unique_ptr<WindowCompositorFrameSink> | 75 std::unique_ptr<WindowCompositorFrameSink> |
| 69 WindowPortMus::RequestCompositorFrameSink( | 76 WindowPortMus::RequestCompositorFrameSink( |
| 70 ui::mojom::CompositorFrameSinkType type, | 77 ui::mojom::CompositorFrameSinkType type, |
| 71 scoped_refptr<cc::ContextProvider> context_provider, | 78 scoped_refptr<cc::ContextProvider> context_provider, |
| 72 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) { | 79 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) { |
| 73 std::unique_ptr<WindowCompositorFrameSinkBinding> | 80 std::unique_ptr<WindowCompositorFrameSinkBinding> |
| 74 compositor_frame_sink_binding; | 81 compositor_frame_sink_binding; |
| 75 std::unique_ptr<WindowCompositorFrameSink> compositor_frame_sink = | 82 std::unique_ptr<WindowCompositorFrameSink> compositor_frame_sink = |
| 76 WindowCompositorFrameSink::Create(std::move(context_provider), | 83 WindowCompositorFrameSink::Create(std::move(context_provider), |
| 77 gpu_memory_buffer_manager, | 84 gpu_memory_buffer_manager, |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 change_data.property_name = | 425 change_data.property_name = |
| 419 GetPropertyConverter()->GetTransportNameForPropertyKey(key); | 426 GetPropertyConverter()->GetTransportNameForPropertyKey(key); |
| 420 // TODO(sky): investigate to see if we need to compare data. In particular do | 427 // TODO(sky): investigate to see if we need to compare data. In particular do |
| 421 // we ever have a case where changing a property cascades into changing the | 428 // we ever have a case where changing a property cascades into changing the |
| 422 // same property? | 429 // same property? |
| 423 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data)) | 430 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data)) |
| 424 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data)); | 431 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data)); |
| 425 } | 432 } |
| 426 | 433 |
| 427 } // namespace aura | 434 } // namespace aura |
| OLD | NEW |