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

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

Issue 699173003: Makes ViewManagerServiceImpl track a single root (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: comment Created 6 years, 1 month 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 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/connection_manager.h" 5 #include "mojo/services/view_manager/connection_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "mojo/converters/geometry/geometry_type_converters.h" 9 #include "mojo/converters/geometry/geometry_type_converters.h"
10 #include "mojo/converters/input_events/input_events_type_converters.h" 10 #include "mojo/converters/input_events/input_events_type_converters.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 bool ConnectionManager::DidConnectionMessageClient( 167 bool ConnectionManager::DidConnectionMessageClient(
168 ConnectionSpecificId id) const { 168 ConnectionSpecificId id) const {
169 return current_change_ && current_change_->DidMessageConnection(id); 169 return current_change_ && current_change_->DidMessageConnection(id);
170 } 170 }
171 171
172 const ViewManagerServiceImpl* ConnectionManager::GetConnectionWithRoot( 172 const ViewManagerServiceImpl* ConnectionManager::GetConnectionWithRoot(
173 const ViewId& id) const { 173 const ViewId& id) const {
174 for (ConnectionMap::const_iterator i = connection_map_.begin(); 174 for (ConnectionMap::const_iterator i = connection_map_.begin();
175 i != connection_map_.end(); 175 i != connection_map_.end();
176 ++i) { 176 ++i) {
177 if (i->second->HasRoot(id)) 177 if (i->second->IsRoot(id))
178 return i->second; 178 return i->second;
179 } 179 }
180 return NULL; 180 return NULL;
181 } 181 }
182 182
183 void ConnectionManager::ProcessViewBoundsChanged(const ServerView* view, 183 void ConnectionManager::ProcessViewBoundsChanged(const ServerView* view,
184 const gfx::Rect& old_bounds, 184 const gfx::Rect& old_bounds,
185 const gfx::Rect& new_bounds) { 185 const gfx::Rect& new_bounds) {
186 for (ConnectionMap::iterator i = connection_map_.begin(); 186 for (ConnectionMap::iterator i = connection_map_.begin();
187 i != connection_map_.end(); 187 i != connection_map_.end();
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 new WindowManagerInternalClientImpl(this, this)); 380 new WindowManagerInternalClientImpl(this, this));
381 WeakBindToRequest(wm_internal_client_impl_.get(), &request); 381 WeakBindToRequest(wm_internal_client_impl_.get(), &request);
382 } 382 }
383 383
384 void ConnectionManager::OnConnectionError() { 384 void ConnectionManager::OnConnectionError() {
385 delegate_->OnLostConnectionToWindowManager(); 385 delegate_->OnLostConnectionToWindowManager();
386 } 386 }
387 387
388 } // namespace service 388 } // namespace service
389 } // namespace mojo 389 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/view_manager/access_policy_delegate.h ('k') | mojo/services/view_manager/default_access_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698