| 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 "services/view_manager/connection_manager.h" | 5 #include "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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 238 |
| 239 void ConnectionManager::ProcessViewBoundsChanged(const ServerView* view, | 239 void ConnectionManager::ProcessViewBoundsChanged(const ServerView* view, |
| 240 const gfx::Rect& old_bounds, | 240 const gfx::Rect& old_bounds, |
| 241 const gfx::Rect& new_bounds) { | 241 const gfx::Rect& new_bounds) { |
| 242 for (auto& pair : connection_map_) { | 242 for (auto& pair : connection_map_) { |
| 243 pair.second->service()->ProcessViewBoundsChanged( | 243 pair.second->service()->ProcessViewBoundsChanged( |
| 244 view, old_bounds, new_bounds, IsChangeSource(pair.first)); | 244 view, old_bounds, new_bounds, IsChangeSource(pair.first)); |
| 245 } | 245 } |
| 246 } | 246 } |
| 247 | 247 |
| 248 void ConnectionManager::ProcessViewportMetricsChanged( |
| 249 const mojo::ViewportMetrics& old_metrics, |
| 250 const mojo::ViewportMetrics& new_metrics) { |
| 251 for (auto& pair : connection_map_) { |
| 252 pair.second->service()->ProcessViewportMetricsChanged( |
| 253 old_metrics, new_metrics, IsChangeSource(pair.first)); |
| 254 } |
| 255 } |
| 256 |
| 248 void ConnectionManager::ProcessWillChangeViewHierarchy( | 257 void ConnectionManager::ProcessWillChangeViewHierarchy( |
| 249 const ServerView* view, | 258 const ServerView* view, |
| 250 const ServerView* new_parent, | 259 const ServerView* new_parent, |
| 251 const ServerView* old_parent) { | 260 const ServerView* old_parent) { |
| 252 for (auto& pair : connection_map_) { | 261 for (auto& pair : connection_map_) { |
| 253 pair.second->service()->ProcessWillChangeViewHierarchy( | 262 pair.second->service()->ProcessWillChangeViewHierarchy( |
| 254 view, new_parent, old_parent, IsChangeSource(pair.first)); | 263 view, new_parent, old_parent, IsChangeSource(pair.first)); |
| 255 } | 264 } |
| 256 } | 265 } |
| 257 | 266 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 void ConnectionManager::SetViewportSize(mojo::SizePtr size) { | 463 void ConnectionManager::SetViewportSize(mojo::SizePtr size) { |
| 455 gfx::Size new_size = size.To<gfx::Size>(); | 464 gfx::Size new_size = size.To<gfx::Size>(); |
| 456 display_manager_->SetViewportSize(new_size); | 465 display_manager_->SetViewportSize(new_size); |
| 457 } | 466 } |
| 458 | 467 |
| 459 void ConnectionManager::CloneAndAnimate(mojo::Id transport_view_id) { | 468 void ConnectionManager::CloneAndAnimate(mojo::Id transport_view_id) { |
| 460 CloneAndAnimate(ViewIdFromTransportId(transport_view_id)); | 469 CloneAndAnimate(ViewIdFromTransportId(transport_view_id)); |
| 461 } | 470 } |
| 462 | 471 |
| 463 } // namespace view_manager | 472 } // namespace view_manager |
| OLD | NEW |