| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "services/ui/view_manager/view_host_impl.h" |
| 6 #include "services/ui/view_manager/view_manager_impl.h" |
| 7 #include "services/ui/view_manager/view_tree_host_impl.h" |
| 8 |
| 9 namespace view_manager { |
| 10 |
| 11 ViewManagerImpl::ViewManagerImpl(ViewRegistry* registry) |
| 12 : registry_(registry) {} |
| 13 |
| 14 ViewManagerImpl::~ViewManagerImpl() {} |
| 15 |
| 16 void ViewManagerImpl::RegisterView( |
| 17 mojo::ui::ViewPtr view, |
| 18 mojo::InterfaceRequest<mojo::ui::ViewHost> view_host_request, |
| 19 const RegisterViewCallback& callback) { |
| 20 mojo::ui::ViewTokenPtr view_token = |
| 21 registry_->RegisterView(view.Pass(), view_host_request.Pass()); |
| 22 callback.Run(view_token.Pass()); |
| 23 } |
| 24 |
| 25 void ViewManagerImpl::RegisterViewTree( |
| 26 mojo::ui::ViewTreePtr view_tree, |
| 27 mojo::InterfaceRequest<mojo::ui::ViewTreeHost> view_tree_host_request, |
| 28 const RegisterViewTreeCallback& callback) { |
| 29 registry_->RegisterViewTree(view_tree.Pass(), view_tree_host_request.Pass()); |
| 30 callback.Run(); |
| 31 } |
| 32 |
| 33 } // namespace view_manager |
| OLD | NEW |