| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/gfx/android/shared_device_display_info.h" | 5 #include "ui/gfx/android/shared_device_display_info.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "jni/DeviceDisplayInfo_jni.h" | 10 #include "jni/DeviceDisplayInfo_jni.h" |
| 11 | 11 |
| 12 namespace gfx { | 12 namespace gfx { |
| 13 | 13 |
| 14 // static JNI call | 14 // static JNI call |
| 15 static void UpdateSharedDeviceDisplayInfo(JNIEnv* env, | 15 static void UpdateSharedDeviceDisplayInfo(JNIEnv* env, |
| 16 jobject obj, | 16 const JavaParamRef<jobject>& obj, |
| 17 jint display_height, | 17 jint display_height, |
| 18 jint display_width, | 18 jint display_width, |
| 19 jint physical_display_height, | 19 jint physical_display_height, |
| 20 jint physical_display_width, | 20 jint physical_display_width, |
| 21 jint bits_per_pixel, | 21 jint bits_per_pixel, |
| 22 jint bits_per_component, | 22 jint bits_per_component, |
| 23 jdouble dip_scale, | 23 jdouble dip_scale, |
| 24 jint smallest_dip_width, | 24 jint smallest_dip_width, |
| 25 jint rotation_degrees) { | 25 jint rotation_degrees) { |
| 26 SharedDeviceDisplayInfo::GetInstance()->InvokeUpdate(env, obj, | 26 SharedDeviceDisplayInfo::GetInstance()->InvokeUpdate(env, obj, |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 physical_display_height_ = static_cast<int>(physical_display_height); | 154 physical_display_height_ = static_cast<int>(physical_display_height); |
| 155 physical_display_width_ = static_cast<int>(physical_display_width); | 155 physical_display_width_ = static_cast<int>(physical_display_width); |
| 156 bits_per_pixel_ = static_cast<int>(bits_per_pixel); | 156 bits_per_pixel_ = static_cast<int>(bits_per_pixel); |
| 157 bits_per_component_ = static_cast<int>(bits_per_component); | 157 bits_per_component_ = static_cast<int>(bits_per_component); |
| 158 dip_scale_ = static_cast<double>(dip_scale); | 158 dip_scale_ = static_cast<double>(dip_scale); |
| 159 smallest_dip_width_ = static_cast<int>(smallest_dip_width); | 159 smallest_dip_width_ = static_cast<int>(smallest_dip_width); |
| 160 rotation_degrees_ = static_cast<int>(rotation_degrees); | 160 rotation_degrees_ = static_cast<int>(rotation_degrees); |
| 161 } | 161 } |
| 162 | 162 |
| 163 } // namespace gfx | 163 } // namespace gfx |
| OLD | NEW |