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

Unified Diff: components/native_viewport/native_viewport_impl.cc

Issue 1136743003: Plumbs through screen size and scale factor to html_viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « components/native_viewport/native_viewport_impl.h ('k') | components/native_viewport/platform_viewport.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/native_viewport/native_viewport_impl.cc
diff --git a/components/native_viewport/native_viewport_impl.cc b/components/native_viewport/native_viewport_impl.cc
index 1b1e548df7aad8416a159b9f3acdc44806c2f58f..2f85500088553deddbbbaca9b657e83e1ddf9dfe 100644
--- a/components/native_viewport/native_viewport_impl.cc
+++ b/components/native_viewport/native_viewport_impl.cc
@@ -99,7 +99,9 @@ void NativeViewportImpl::OnMetricsChanged(mojo::ViewportMetricsPtr metrics) {
}
void NativeViewportImpl::OnAcceleratedWidgetAvailable(
- gfx::AcceleratedWidget widget) {
+ gfx::AcceleratedWidget widget,
+ float device_pixel_ratio) {
+ metrics_->device_pixel_ratio = device_pixel_ratio;
context_provider_.SetAcceleratedWidget(widget);
// TODO: The metrics here might not match the actual window size on android
// where we don't know the actual size until the first OnMetricsChanged call.
« no previous file with comments | « components/native_viewport/native_viewport_impl.h ('k') | components/native_viewport/platform_viewport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698