Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: services/ui/view_manager/view_manager_impl.cc

Issue 1949233002: Create a RegisterViewAssociate method in ViewManager (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: tiny bit more cleanup Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_manager_impl.h" 5 #include "services/ui/view_manager/view_manager_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h"
10
jeffbrown 2016/05/11 23:44:20 remove blank line
mikejurka 2016/05/16 23:35:18 Done.
9 #include "services/ui/view_manager/view_impl.h" 11 #include "services/ui/view_manager/view_impl.h"
10 #include "services/ui/view_manager/view_tree_impl.h" 12 #include "services/ui/view_manager/view_tree_impl.h"
11 13
12 namespace view_manager { 14 namespace view_manager {
13 15
14 ViewManagerImpl::ViewManagerImpl(ViewRegistry* registry) 16 ViewManagerImpl::ViewManagerImpl(ViewRegistry* registry)
15 : registry_(registry) {} 17 : registry_(registry) {}
16 18
17 ViewManagerImpl::~ViewManagerImpl() {} 19 ViewManagerImpl::~ViewManagerImpl() {}
18 20
(...skipping 10 matching lines...) Expand all
29 void ViewManagerImpl::CreateViewTree( 31 void ViewManagerImpl::CreateViewTree(
30 mojo::InterfaceRequest<mojo::ui::ViewTree> view_tree_request, 32 mojo::InterfaceRequest<mojo::ui::ViewTree> view_tree_request,
31 mojo::InterfaceHandle<mojo::ui::ViewTreeListener> view_tree_listener, 33 mojo::InterfaceHandle<mojo::ui::ViewTreeListener> view_tree_listener,
32 const mojo::String& label) { 34 const mojo::String& label) {
33 registry_->CreateViewTree( 35 registry_->CreateViewTree(
34 view_tree_request.Pass(), 36 view_tree_request.Pass(),
35 mojo::ui::ViewTreeListenerPtr::Create(std::move(view_tree_listener)), 37 mojo::ui::ViewTreeListenerPtr::Create(std::move(view_tree_listener)),
36 label); 38 label);
37 } 39 }
38 40
41 // this should only really be called by trusted code (ie launcher) -- how to
jeffbrown 2016/05/11 23:44:20 // TODO(mikejurka): This should only be ...
mikejurka 2016/05/16 23:35:18 Done.
42 // ensure that?
43 void ViewManagerImpl::RegisterViewAssociate(
44 mojo::InterfaceHandle<mojo::ui::ViewAssociate> view_associate) {
45 registry_->RegisterViewAssociate(
46 registry_, mojo::ui::ViewAssociatePtr::Create(std::move(view_associate)));
47 }
48
39 } // namespace view_manager 49 } // namespace view_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698