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

Side by Side Diff: mojo/services/view_manager/view_manager_init_service_context.cc

Issue 510483003: Rename RootViewManager to DisplayManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « mojo/services/view_manager/view_manager_init_service_context.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 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 "mojo/services/view_manager/view_manager_init_service_context.h" 5 #include "mojo/services/view_manager/view_manager_init_service_context.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "mojo/services/view_manager/root_node_manager.h" 9 #include "mojo/services/view_manager/root_node_manager.h"
10 #include "mojo/services/view_manager/view_manager_init_service_impl.h" 10 #include "mojo/services/view_manager/view_manager_init_service_impl.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 ServiceProviderPtr service_provider, 60 ServiceProviderPtr service_provider,
61 const Callback<void(bool)>& callback) { 61 const Callback<void(bool)>& callback) {
62 ConnectParams* params = new ConnectParams; 62 ConnectParams* params = new ConnectParams;
63 params->url = url.To<std::string>(); 63 params->url = url.To<std::string>();
64 params->callback = callback; 64 params->callback = callback;
65 params->service_provider.Bind(service_provider.PassMessagePipe()); 65 params->service_provider.Bind(service_provider.PassMessagePipe());
66 connect_params_.push_back(params); 66 connect_params_.push_back(params);
67 MaybeEmbed(); 67 MaybeEmbed();
68 } 68 }
69 69
70 void ViewManagerInitServiceContext::OnRootViewManagerWindowTreeHostCreated() { 70 void ViewManagerInitServiceContext::OnDisplayManagerWindowTreeHostCreated() {
71 DCHECK(!is_tree_host_ready_); 71 DCHECK(!is_tree_host_ready_);
72 is_tree_host_ready_ = true; 72 is_tree_host_ready_ = true;
73 MaybeEmbed(); 73 MaybeEmbed();
74 } 74 }
75 75
76 void ViewManagerInitServiceContext::OnNativeViewportDeleted() { 76 void ViewManagerInitServiceContext::OnNativeViewportDeleted() {
77 // Prevent the connection from modifying the connection list during manual 77 // Prevent the connection from modifying the connection list during manual
78 // teardown. 78 // teardown.
79 base::AutoReset<bool> deleting_connection(&deleting_connection_, true); 79 base::AutoReset<bool> deleting_connection(&deleting_connection_, true);
80 for (Connections::const_iterator it = connections_.begin(); 80 for (Connections::const_iterator it = connections_.begin();
(...skipping 11 matching lines...) Expand all
92 for (ScopedVector<ConnectParams>::const_iterator it = connect_params_.begin(); 92 for (ScopedVector<ConnectParams>::const_iterator it = connect_params_.begin();
93 it != connect_params_.end(); ++it) { 93 it != connect_params_.end(); ++it) {
94 root_node_manager_->EmbedRoot((*it)->url, (*it)->service_provider.Pass()); 94 root_node_manager_->EmbedRoot((*it)->url, (*it)->service_provider.Pass());
95 (*it)->callback.Run(true); 95 (*it)->callback.Run(true);
96 } 96 }
97 connect_params_.clear(); 97 connect_params_.clear();
98 } 98 }
99 99
100 } // namespace service 100 } // namespace service
101 } // namespace mojo 101 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/view_manager/view_manager_init_service_context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698