Index: sky/shell/ui/engine.cc |
diff --git a/sky/shell/ui/engine.cc b/sky/shell/ui/engine.cc |
index ed1971d3677d276578b3fe96b13c714a2f1bc761..07deb847c24e59da3022b478b6b4f12c87ab4044 100644 |
--- a/sky/shell/ui/engine.cc |
+++ b/sky/shell/ui/engine.cc |
@@ -32,5 +32,13 @@ void Engine::Init() { |
web_view_->setMainFrame(blink::WebLocalFrame::create(this)); |
} |
+void Engine::OnViewportMetricsChanged(const gfx::Size& size, |
+ float device_pixel_ratio) { |
+ blink::WebSize web_size(size.width() / device_pixel_ratio, |
+ size.height() / device_pixel_ratio); |
+ web_view_->setDeviceScaleFactor(device_pixel_ratio); |
+ web_view_->resize(web_size); |
+} |
+ |
} // namespace shell |
} // namespace sky |