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

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

Issue 880743002: Plumb ViewportMetrics change notifications around the world and back. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fix typo Created 5 years, 10 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/view_manager/connection_manager.h ('k') | services/view_manager/display_manager.cc » ('j') | 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 "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
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
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
OLDNEW
« no previous file with comments | « services/view_manager/connection_manager.h ('k') | services/view_manager/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698