OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "services/ui/view_manager/view_host_impl.h" | 5 #include "services/ui/view_manager/view_host_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "services/ui/view_manager/view_registry.h" | 8 #include "services/ui/view_manager/view_registry.h" |
9 #include "services/ui/view_manager/view_state.h" | 9 #include "services/ui/view_manager/view_state.h" |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 void ViewHostImpl::CreateScene( | 28 void ViewHostImpl::CreateScene( |
29 mojo::InterfaceRequest<mojo::gfx::composition::Scene> scene) { | 29 mojo::InterfaceRequest<mojo::gfx::composition::Scene> scene) { |
30 registry_->CreateScene(state_, scene.Pass()); | 30 registry_->CreateScene(state_, scene.Pass()); |
31 } | 31 } |
32 | 32 |
33 void ViewHostImpl::RequestLayout() { | 33 void ViewHostImpl::RequestLayout() { |
34 registry_->RequestLayout(state_); | 34 registry_->RequestLayout(state_); |
35 } | 35 } |
36 | 36 |
37 void ViewHostImpl::AddChild(uint32_t child_key, | 37 void ViewHostImpl::AddChild( |
38 mojo::ui::ViewOwnerPtr child_view_owner) { | 38 uint32_t child_key, |
| 39 mojo::InterfaceHandle<mojo::ui::ViewOwner> child_view_owner) { |
39 registry_->AddChild(state_, child_key, child_view_owner.Pass()); | 40 registry_->AddChild(state_, child_key, child_view_owner.Pass()); |
40 } | 41 } |
41 | 42 |
42 void ViewHostImpl::RemoveChild(uint32_t child_key, | 43 void ViewHostImpl::RemoveChild(uint32_t child_key, |
43 mojo::InterfaceRequest<mojo::ui::ViewOwner> | 44 mojo::InterfaceRequest<mojo::ui::ViewOwner> |
44 transferred_view_owner_request) { | 45 transferred_view_owner_request) { |
45 registry_->RemoveChild(state_, child_key, | 46 registry_->RemoveChild(state_, child_key, |
46 transferred_view_owner_request.Pass()); | 47 transferred_view_owner_request.Pass()); |
47 } | 48 } |
48 | 49 |
(...skipping 11 matching lines...) Expand all Loading... |
60 base::Bind(&RunLayoutChildCallback, callback)); | 61 base::Bind(&RunLayoutChildCallback, callback)); |
61 } | 62 } |
62 | 63 |
63 void ViewHostImpl::ConnectToService( | 64 void ViewHostImpl::ConnectToService( |
64 const mojo::String& service_name, | 65 const mojo::String& service_name, |
65 mojo::ScopedMessagePipeHandle client_handle) { | 66 mojo::ScopedMessagePipeHandle client_handle) { |
66 registry_->ConnectToViewService(state_, service_name, client_handle.Pass()); | 67 registry_->ConnectToViewService(state_, service_name, client_handle.Pass()); |
67 } | 68 } |
68 | 69 |
69 } // namespace view_manager | 70 } // namespace view_manager |
OLD | NEW |