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

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

Issue 1779933003: Mozart: Replace Set/Reset nomenclature with Set/Clear. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-8
Patch Set: Created 4 years, 9 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
« no previous file with comments | « services/ui/view_manager/view_tree_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_tree_impl.h" 5 #include "services/ui/view_manager/view_tree_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_tree_state.h" 9 #include "services/ui/view_manager/view_tree_state.h"
10 10
(...skipping 22 matching lines...) Expand all
33 void ViewTreeImpl::RequestLayout() { 33 void ViewTreeImpl::RequestLayout() {
34 registry_->RequestLayout(state_); 34 registry_->RequestLayout(state_);
35 } 35 }
36 36
37 void ViewTreeImpl::SetRoot( 37 void ViewTreeImpl::SetRoot(
38 uint32_t root_key, 38 uint32_t root_key,
39 mojo::InterfaceHandle<mojo::ui::ViewOwner> root_view_owner) { 39 mojo::InterfaceHandle<mojo::ui::ViewOwner> root_view_owner) {
40 registry_->SetRoot(state_, root_key, root_view_owner.Pass()); 40 registry_->SetRoot(state_, root_key, root_view_owner.Pass());
41 } 41 }
42 42
43 void ViewTreeImpl::ResetRoot(mojo::InterfaceRequest<mojo::ui::ViewOwner> 43 void ViewTreeImpl::ClearRoot(mojo::InterfaceRequest<mojo::ui::ViewOwner>
44 transferred_view_owner_request) { 44 transferred_view_owner_request) {
45 registry_->ResetRoot(state_, transferred_view_owner_request.Pass()); 45 registry_->ClearRoot(state_, transferred_view_owner_request.Pass());
46 } 46 }
47 47
48 static void RunLayoutRootCallback( 48 static void RunLayoutRootCallback(
49 const ViewTreeImpl::LayoutRootCallback& callback, 49 const ViewTreeImpl::LayoutRootCallback& callback,
50 mojo::ui::ViewLayoutInfoPtr info) { 50 mojo::ui::ViewLayoutInfoPtr info) {
51 callback.Run(info.Pass()); 51 callback.Run(info.Pass());
52 } 52 }
53 53
54 void ViewTreeImpl::LayoutRoot(mojo::ui::ViewLayoutParamsPtr root_layout_params, 54 void ViewTreeImpl::LayoutRoot(mojo::ui::ViewLayoutParamsPtr root_layout_params,
55 const LayoutRootCallback& callback) { 55 const LayoutRootCallback& callback) {
56 registry_->LayoutRoot(state_, root_layout_params.Pass(), 56 registry_->LayoutRoot(state_, root_layout_params.Pass(),
57 base::Bind(&RunLayoutRootCallback, callback)); 57 base::Bind(&RunLayoutRootCallback, callback));
58 } 58 }
59 59
60 void ViewTreeImpl::ConnectToService( 60 void ViewTreeImpl::ConnectToService(
61 const mojo::String& service_name, 61 const mojo::String& service_name,
62 mojo::ScopedMessagePipeHandle client_handle) { 62 mojo::ScopedMessagePipeHandle client_handle) {
63 registry_->ConnectToViewTreeService(state_, service_name, 63 registry_->ConnectToViewTreeService(state_, service_name,
64 client_handle.Pass()); 64 client_handle.Pass());
65 } 65 }
66 66
67 } // namespace view_manager 67 } // namespace view_manager
OLDNEW
« no previous file with comments | « services/ui/view_manager/view_tree_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698