Index: mojo/services/view_manager/public/cpp/lib/view.cc |
diff --git a/mojo/services/view_manager/public/cpp/lib/view.cc b/mojo/services/view_manager/public/cpp/lib/view.cc |
index c07edebd2f9e05a8ba746d76124043126b2995de..02f61a1d6109ed7d1ec5cf6a8b97c072019c8e2a 100644 |
--- a/mojo/services/view_manager/public/cpp/lib/view.cc |
+++ b/mojo/services/view_manager/public/cpp/lib/view.cc |
@@ -489,6 +489,17 @@ void View::LocalSetBounds(const Rect& old_bounds, |
bounds_ = new_bounds; |
} |
+void View::LocalSetViewportMetrics(const ViewportMetrics& old_metrics, |
sky
2015/01/27 16:35:08
Why does this need to take old_metrics? Isn't old_
eseidel
2015/01/27 18:50:04
I just tried to make it match what LocalSetBounds
|
+ const ViewportMetrics& new_metrics) { |
+ DCHECK(viewport_metrics_->size == viewport_metrics_->size); |
sky
2015/01/27 16:35:08
I think there is a bug where viewport_metrics_ is
eseidel
2015/01/27 18:50:04
Yes, there is. It's fixed a little in this patch,
|
+ DCHECK(viewport_metrics_->device_pixel_ratio == |
+ viewport_metrics_->device_pixel_ratio); |
+ viewport_metrics_ = new_metrics.Clone(); |
+ FOR_EACH_OBSERVER( |
+ ViewObserver, observers_, |
+ OnViewViewportMetricsChanged(this, old_metrics, new_metrics)); |
+} |
+ |
void View::LocalSetDrawn(bool value) { |
if (drawn_ == value) |
return; |