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 "components/mus/public/cpp/lib/window_tree_client_impl.h" | 5 #include "components/mus/public/cpp/lib/window_tree_client_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
940 mojo::Map<mojo::String, mojo::Array<uint8_t>> transport_properties) { | 940 mojo::Map<mojo::String, mojo::Array<uint8_t>> transport_properties) { |
941 std::map<std::string, std::vector<uint8_t>> properties = | 941 std::map<std::string, std::vector<uint8_t>> properties = |
942 transport_properties.To<std::map<std::string, std::vector<uint8_t>>>(); | 942 transport_properties.To<std::map<std::string, std::vector<uint8_t>>>(); |
943 Window* window = | 943 Window* window = |
944 window_manager_delegate_->OnWmCreateTopLevelWindow(&properties); | 944 window_manager_delegate_->OnWmCreateTopLevelWindow(&properties); |
945 window_manager_internal_client_->OnWmCreatedTopLevelWindow(change_id, | 945 window_manager_internal_client_->OnWmCreatedTopLevelWindow(change_id, |
946 window->id()); | 946 window->id()); |
947 } | 947 } |
948 | 948 |
949 void WindowTreeClientImpl::OnAccelerator(uint32_t id, mojom::EventPtr event) { | 949 void WindowTreeClientImpl::OnAccelerator(uint32_t id, mojom::EventPtr event) { |
950 window_manager_delegate_->OnAccelerator(id, std::move(event)); | 950 window_manager_delegate_->OnAccelerator( |
| 951 id, *event.To<scoped_ptr<ui::Event>>().get()); |
951 } | 952 } |
952 | 953 |
953 void WindowTreeClientImpl::SetFrameDecorationValues( | 954 void WindowTreeClientImpl::SetFrameDecorationValues( |
954 mojom::FrameDecorationValuesPtr values) { | 955 mojom::FrameDecorationValuesPtr values) { |
955 window_manager_internal_client_->WmSetFrameDecorationValues( | 956 window_manager_internal_client_->WmSetFrameDecorationValues( |
956 std::move(values)); | 957 std::move(values)); |
957 } | 958 } |
958 | 959 |
959 void WindowTreeClientImpl::AddAccelerator( | 960 void WindowTreeClientImpl::AddAccelerator( |
960 uint32_t id, | 961 uint32_t id, |
(...skipping 21 matching lines...) Expand all Loading... |
982 | 983 |
983 void WindowTreeClientImpl::SetUnderlaySurfaceOffsetAndExtendedHitArea( | 984 void WindowTreeClientImpl::SetUnderlaySurfaceOffsetAndExtendedHitArea( |
984 Window* window, | 985 Window* window, |
985 const gfx::Vector2d& offset, | 986 const gfx::Vector2d& offset, |
986 const gfx::Insets& hit_area) { | 987 const gfx::Insets& hit_area) { |
987 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( | 988 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( |
988 window->id(), offset.x(), offset.y(), mojo::Insets::From(hit_area)); | 989 window->id(), offset.x(), offset.y(), mojo::Insets::From(hit_area)); |
989 } | 990 } |
990 | 991 |
991 } // namespace mus | 992 } // namespace mus |
OLD | NEW |