| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 void WindowPortMus::SetTextInputState(mojo::TextInputStatePtr state) { | 51 void WindowPortMus::SetTextInputState(mojo::TextInputStatePtr state) { |
| 52 window_tree_client_->SetWindowTextInputState(this, std::move(state)); | 52 window_tree_client_->SetWindowTextInputState(this, std::move(state)); |
| 53 } | 53 } |
| 54 | 54 |
| 55 void WindowPortMus::SetImeVisibility(bool visible, | 55 void WindowPortMus::SetImeVisibility(bool visible, |
| 56 mojo::TextInputStatePtr state) { | 56 mojo::TextInputStatePtr state) { |
| 57 window_tree_client_->SetImeVisibility(this, visible, std::move(state)); | 57 window_tree_client_->SetImeVisibility(this, visible, std::move(state)); |
| 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_) |
| 62 return; |
| 63 |
| 61 window_tree_client_->SetPredefinedCursor(this, predefined_cursor_, cursor_id); | 64 window_tree_client_->SetPredefinedCursor(this, predefined_cursor_, cursor_id); |
| 62 predefined_cursor_ = cursor_id; | 65 predefined_cursor_ = cursor_id; |
| 63 } | 66 } |
| 64 | 67 |
| 65 std::unique_ptr<WindowCompositorFrameSink> | 68 std::unique_ptr<WindowCompositorFrameSink> |
| 66 WindowPortMus::RequestCompositorFrameSink( | 69 WindowPortMus::RequestCompositorFrameSink( |
| 67 ui::mojom::CompositorFrameSinkType type, | 70 ui::mojom::CompositorFrameSinkType type, |
| 68 scoped_refptr<cc::ContextProvider> context_provider, | 71 scoped_refptr<cc::ContextProvider> context_provider, |
| 69 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) { | 72 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) { |
| 70 std::unique_ptr<WindowCompositorFrameSinkBinding> | 73 std::unique_ptr<WindowCompositorFrameSinkBinding> |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 change_data.property_name = | 414 change_data.property_name = |
| 412 GetPropertyConverter()->GetTransportNameForPropertyKey(key); | 415 GetPropertyConverter()->GetTransportNameForPropertyKey(key); |
| 413 // TODO(sky): investigate to see if we need to compare data. In particular do | 416 // TODO(sky): investigate to see if we need to compare data. In particular do |
| 414 // we ever have a case where changing a property cascades into changing the | 417 // we ever have a case where changing a property cascades into changing the |
| 415 // same property? | 418 // same property? |
| 416 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data)) | 419 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data)) |
| 417 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data)); | 420 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data)); |
| 418 } | 421 } |
| 419 | 422 |
| 420 } // namespace aura | 423 } // namespace aura |
| OLD | NEW |