OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |