summaryrefslogtreecommitdiffstats
path: root/ui/views
diff options
context:
space:
mode:
Diffstat (limited to 'ui/views')
-rw-r--r--ui/views/view.cc4
-rw-r--r--ui/views/view.h1
-rw-r--r--ui/views/widget/native_widget_aura.cc4
-rw-r--r--ui/views/widget/native_widget_aura.h1
4 files changed, 10 insertions, 0 deletions
diff --git a/ui/views/view.cc b/ui/views/view.cc
index f5dd39b..cbcb45c 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -1230,6 +1230,10 @@ void View::OnPaintLayer(gfx::Canvas* canvas) {
PaintCommon(canvas);
}
+void View::OnDeviceScaleFactorChanged(float device_scale_factor) {
+ // Repainting with new scale factor will paint the content at the right scale.
+}
+
void View::ReorderLayers() {
View* v = this;
while (v && !v->layer())
diff --git a/ui/views/view.h b/ui/views/view.h
index fc4a27f..8492d95 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -996,6 +996,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// Overridden from ui::LayerDelegate:
virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
// Finds the layer that this view paints to (it may belong to an ancestor
// view), then reorders the immediate children of that layer to match the
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index b63e8fd..a71b3d7 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -784,6 +784,10 @@ void NativeWidgetAura::OnPaint(gfx::Canvas* canvas) {
delegate_->OnNativeWidgetPaint(canvas);
}
+void NativeWidgetAura::OnDeviceScaleFactorChanged(float device_scale_factor) {
+ // Repainting with new scale factor will paint the content at the right scale.
+}
+
void NativeWidgetAura::OnWindowDestroying() {
delegate_->OnNativeWidgetDestroying();
diff --git a/ui/views/widget/native_widget_aura.h b/ui/views/widget/native_widget_aura.h
index c9a1480..7d89a77 100644
--- a/ui/views/widget/native_widget_aura.h
+++ b/ui/views/widget/native_widget_aura.h
@@ -144,6 +144,7 @@ class VIEWS_EXPORT NativeWidgetAura : public internal::NativeWidgetPrivate,
virtual bool CanFocus() OVERRIDE;
virtual void OnCaptureLost() OVERRIDE;
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
virtual void OnWindowDestroying() OVERRIDE;
virtual void OnWindowDestroyed() OVERRIDE;
virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE;