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

Unified Diff: services/view_manager/view_manager_service_impl.cc

Issue 880743002: Plumb ViewportMetrics change notifications around the world and back. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: services/view_manager/view_manager_service_impl.cc
diff --git a/services/view_manager/view_manager_service_impl.cc b/services/view_manager/view_manager_service_impl.cc
index 2ed0193e8e9d5348a044fb14e62aa94bd2bced24..3a76bb0c1a5b95f50f98a3d77060c0e7e6aa939a 100644
--- a/services/view_manager/view_manager_service_impl.cc
+++ b/services/view_manager/view_manager_service_impl.cc
@@ -175,6 +175,18 @@ void ViewManagerServiceImpl::ProcessViewBoundsChanged(
Rect::From(new_bounds));
}
+void ViewManagerServiceImpl::ProcessViewportMetricsChanged(
+ const ServerView* view,
+ const mojo::ViewportMetrics& old_metrics,
+ const mojo::ViewportMetrics& new_metrics,
+ bool originated_change) {
+ if (originated_change || !IsViewKnown(view))
sky 2015/01/27 16:35:08 This is only going to notify clients that know of
eseidel 2015/01/27 18:50:04 I just copied this from ProcessBoundsChanged. :/
+ return;
+ client()->OnViewViewportMetricsChanged(ViewIdToTransportId(view->id()),
+ old_metrics.Clone(),
+ new_metrics.Clone());
+}
+
void ViewManagerServiceImpl::ProcessWillChangeViewHierarchy(
const ServerView* view,
const ServerView* new_parent,

Powered by Google App Engine
This is Rietveld 408576698