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

Unified Diff: components/native_viewport/platform_viewport_android.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
Index: components/native_viewport/platform_viewport_android.cc
diff --git a/components/native_viewport/platform_viewport_android.cc b/components/native_viewport/platform_viewport_android.cc
index 36c26b469d8b2ac70e3a96a5c5dafc8ed800e935..96e57df4da9b80e40925c4df981f98ef0ad92802 100644
--- a/components/native_viewport/platform_viewport_android.cc
+++ b/components/native_viewport/platform_viewport_android.cc
@@ -74,7 +74,8 @@ void PlatformViewportAndroid::Destroy(JNIEnv* env, jobject obj) {
void PlatformViewportAndroid::SurfaceCreated(JNIEnv* env,
jobject obj,
- jobject jsurface) {
+ jobject jsurface,
+ float device_pixel_ratio) {
base::android::ScopedJavaLocalRef<jobject> protector(env, jsurface);
// Note: This ensures that any local references used by
// ANativeWindow_fromSurface are released immediately. This is needed as a
@@ -83,7 +84,7 @@ void PlatformViewportAndroid::SurfaceCreated(JNIEnv* env,
base::android::ScopedJavaLocalFrame scoped_local_reference_frame(env);
window_ = ANativeWindow_fromSurface(env, jsurface);
}
- delegate_->OnAcceleratedWidgetAvailable(window_);
+ delegate_->OnAcceleratedWidgetAvailable(window_, device_pixel_ratio);
}
void PlatformViewportAndroid::SurfaceDestroyed(JNIEnv* env, jobject obj) {
« no previous file with comments | « components/native_viewport/platform_viewport_android.h ('k') | components/native_viewport/platform_viewport_headless.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698