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

Issue 11886074: Use correct favicon scale factor on Android. (Closed)

Created:
7 years, 11 months ago by aruslan
Modified:
7 years, 11 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, jam, penghuang+watch_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, James Su, android-webview-reviews_chromium.org, mnaganov (inactive)
Visibility:
Public.

Description

Use correct favicon scale factor on Android. - Splits and moves Android's display DeviceInfo from content to gfx; - Uses DeviceInfo for Android's Screen implementation; - Uses PrimaryDisplay's scale to figure out favicon scale factor. BUG=168319 BUG=117839 TEST=manual as in 168319; AwSettingsTest#testUseWideViewportLayoutWidth Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=178472

Patch Set 1 #

Patch Set 2 : Removed unnecessary allocation. #

Patch Set 3 : Correct name in the include guard. #

Total comments: 2

Patch Set 4 : Comments added; GetWidth() renamed to GetDisplayWidth() etc. #

Total comments: 6

Patch Set 5 : Addressed review comments, added missing JNI registrations. #

Total comments: 4

Patch Set 6 : Renamed and added JavaBitmap JNI registration to .h #

Total comments: 11

Patch Set 7 : Split DeviceTelephonyInfo from DeviceDisplayInfo; added SCALE_FACTOR_150P and 300P. #

Total comments: 4

Patch Set 8 : Rebase + addressed thakis@ comment. #

Patch Set 9 : Disabled ScreenAndroid::IsDIPEnabled and GetPrimaryDisplay() due to http://crbug.com/152505 #

Patch Set 10 : Unneeded whitespace removed. #

Patch Set 11 : Rebase to the DIP scale fix. #

Patch Set 12 : Final rebase after DIP scale fix. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+387 lines, -326 lines) Patch
M android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/test/base/chrome_test_suite.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M content/app/android/library_loader_hooks.cc View 1 2 3 4 3 chunks +1 line, -5 lines 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -5 lines 0 comments Download
M content/common/android/common_jni_registrar.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -2 lines 0 comments Download
D content/common/android/device_info.h View 1 chunk +0 lines, -41 lines 0 comments Download
D content/common/android/device_info.cc View 1 chunk +0 lines, -80 lines 0 comments Download
A content/common/android/device_telephony_info.h View 1 2 3 4 5 6 1 chunk +37 lines, -0 lines 0 comments Download
A content/common/android/device_telephony_info.cc View 1 2 3 4 5 6 1 chunk +39 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -2 lines 0 comments Download
M content/content_jni.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
D content/public/android/java/src/org/chromium/content/common/DeviceInfo.java View 1 chunk +0 lines, -115 lines 0 comments Download
A content/public/android/java/src/org/chromium/content/common/DeviceTelephonyInfo.java View 1 2 3 4 5 6 1 chunk +42 lines, -0 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/ViewportTest.java View 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -3 lines 0 comments Download
M content/test/run_all_unittests.cc View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
A + ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java View 1 2 3 4 5 6 6 chunks +35 lines, -16 lines 0 comments Download
M ui/android/ui_jni_registrar.h View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M ui/android/ui_jni_registrar.cc View 1 2 3 4 5 6 7 2 chunks +9 lines, -3 lines 0 comments Download
M ui/base/layout.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M ui/base/layout.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +30 lines, -2 lines 0 comments Download
M ui/base/layout_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -2 lines 0 comments Download
A ui/gfx/android/device_display_info.h View 1 2 3 4 5 6 1 chunk +54 lines, -0 lines 0 comments Download
A ui/gfx/android/device_display_info.cc View 1 2 3 4 5 6 1 chunk +73 lines, -0 lines 0 comments Download
D ui/gfx/android/gfx_jni_registrar.h View 1 2 3 4 1 chunk +0 lines, -19 lines 0 comments Download
M ui/gfx/android/gfx_jni_registrar.cc View 1 2 3 4 1 chunk +0 lines, -16 lines 0 comments Download
M ui/gfx/android/java_bitmap.h View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
M ui/gfx/android/java_bitmap.cc View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M ui/gfx/screen_android.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +14 lines, -2 lines 0 comments Download
M ui/test/test_suite.cc View 1 2 3 4 2 chunks +10 lines, -0 lines 0 comments Download
M ui/ui.gyp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
aruslan
Please help with the review. I'll add OWNERS once the initial pass is done. Thanks!
7 years, 11 months ago (2013-01-16 20:01:06 UTC) #1
nilesh
On 2013/01/16 20:01:06, aruslan wrote: > Please help with the review. > I'll add OWNERS ...
7 years, 11 months ago (2013-01-16 20:23:55 UTC) #2
nilesh
https://codereview.chromium.org/11886074/diff/4001/ui/gfx/android/device_info.h File ui/gfx/android/device_info.h (right): https://codereview.chromium.org/11886074/diff/4001/ui/gfx/android/device_info.h#newcode23 ui/gfx/android/device_info.h:23: int GetHeight(); It will be nice to have one ...
7 years, 11 months ago (2013-01-16 20:24:01 UTC) #3
aruslan
Thanks, Nilesh! PTAL. https://codereview.chromium.org/11886074/diff/4001/ui/gfx/android/device_info.h File ui/gfx/android/device_info.h (right): https://codereview.chromium.org/11886074/diff/4001/ui/gfx/android/device_info.h#newcode23 ui/gfx/android/device_info.h:23: int GetHeight(); On 2013/01/16 20:24:01, nileshagrawal1 ...
7 years, 11 months ago (2013-01-16 23:14:45 UTC) #4
nilesh
LGTMq
7 years, 11 months ago (2013-01-16 23:22:07 UTC) #5
aruslan
Thanks, Nilesh! Scott, Yaron -- please review and apply OWNERS seal to the following if ...
7 years, 11 months ago (2013-01-16 23:50:40 UTC) #6
Yaron
Seems reasonable but I'm not really familiar with the ui stuff. https://codereview.chromium.org/11886074/diff/8001/ui/gfx/android/device_info.h File ui/gfx/android/device_info.h (right): ...
7 years, 11 months ago (2013-01-17 00:38:48 UTC) #7
sky
LGTM https://codereview.chromium.org/11886074/diff/8001/ui/base/layout.cc File ui/base/layout.cc (right): https://codereview.chromium.org/11886074/diff/8001/ui/base/layout.cc#newcode85 ui/base/layout.cc:85: for (int i = NUM_SCALE_FACTORS; --i > SCALE_FACTOR_100P;) ...
7 years, 11 months ago (2013-01-17 01:02:32 UTC) #8
aruslan
Scott -- thank you for the review! Yaron -- PTAL at content/ and JNI/gyp-JNI stuff. ...
7 years, 11 months ago (2013-01-17 02:11:47 UTC) #9
aruslan
Summoning the OWNERS for review and OWNERS seals of approval if the changes make sense: ...
7 years, 11 months ago (2013-01-17 02:18:12 UTC) #10
aruslan
Please take a look and OWNERS-approve if the change is sensible. Thanks! avi@ - content/content_common.gypi ...
7 years, 11 months ago (2013-01-17 02:20:40 UTC) #11
Yaron
lgtm https://codereview.chromium.org/11886074/diff/19001/chrome/test/base/chrome_test_suite.cc File chrome/test/base/chrome_test_suite.cc (right): https://codereview.chromium.org/11886074/diff/19001/chrome/test/base/chrome_test_suite.cc#newcode206 chrome/test/base/chrome_test_suite.cc:206: ui::android::RegisterJni(base::android::AttachCurrentThread()); It's a little strange that your change ...
7 years, 11 months ago (2013-01-17 02:20:50 UTC) #12
danakj
I'm an owner of geometry types in ui/gfx. You'll need to find another ui owner ...
7 years, 11 months ago (2013-01-17 02:21:41 UTC) #13
nilesh
https://codereview.chromium.org/11886074/diff/19001/ui/android/ui_jni_registrar.cc File ui/android/ui_jni_registrar.cc (right): https://codereview.chromium.org/11886074/diff/19001/ui/android/ui_jni_registrar.cc#newcode14 ui/android/ui_jni_registrar.cc:14: bool RegisterBitmapAndroid(JNIEnv* env); This is weird. Why is this ...
7 years, 11 months ago (2013-01-17 02:26:48 UTC) #14
aruslan
https://codereview.chromium.org/11886074/diff/19001/chrome/test/base/chrome_test_suite.cc File chrome/test/base/chrome_test_suite.cc (right): https://codereview.chromium.org/11886074/diff/19001/chrome/test/base/chrome_test_suite.cc#newcode206 chrome/test/base/chrome_test_suite.cc:206: ui::android::RegisterJni(base::android::AttachCurrentThread()); On 2013/01/17 02:20:50, Yaron wrote: > It's a ...
7 years, 11 months ago (2013-01-17 02:45:01 UTC) #15
aelias_OOO_until_Jul13
lgtm for content/browser/renderer_host/render_widget_host_view_android.cc
7 years, 11 months ago (2013-01-17 04:24:12 UTC) #16
jamesr
content/renderer changes don't immediately make sense to me. +cc thakis for favicon/scale stuff https://codereview.chromium.org/11886074/diff/2026/content/renderer/render_view_impl.cc File ...
7 years, 11 months ago (2013-01-17 06:12:30 UTC) #17
jamesr
https://codereview.chromium.org/11886074/diff/2026/ui/gfx/android/device_info.h File ui/gfx/android/device_info.h (right): https://codereview.chromium.org/11886074/diff/2026/ui/gfx/android/device_info.h#newcode44 ui/gfx/android/device_info.h:44: std::string GetNetworkCountryIso(); wait - what's this have to do ...
7 years, 11 months ago (2013-01-17 06:18:06 UTC) #18
Nico
Sorry if this has been asked above. https://codereview.chromium.org/11886074/diff/2026/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java (right): https://codereview.chromium.org/11886074/diff/2026/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java#newcode2103 android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java:2103: int displayWidth ...
7 years, 11 months ago (2013-01-17 06:31:32 UTC) #19
Avi (use Gerrit)
I was asked about gyp changes? lgtm
7 years, 11 months ago (2013-01-17 19:53:53 UTC) #20
joth
+acleung FYI. (don't think this impacts your favicon patch, but just in case...)
7 years, 11 months ago (2013-01-17 20:38:55 UTC) #21
acleung1
This seems to be orthogonal to what I am doing. LGTM
7 years, 11 months ago (2013-01-17 22:22:25 UTC) #22
aruslan
Thanks a ton for the suggestions and comments! +mnaganov for AwSettingsTest ceiling/rounding review. https://chromiumcodereview.appspot.com/11886074/diff/2026/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java File ...
7 years, 11 months ago (2013-01-17 23:01:10 UTC) #23
mnaganov (inactive)
LGTM for android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java changes https://chromiumcodereview.appspot.com/11886074/diff/2026/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java (right): https://chromiumcodereview.appspot.com/11886074/diff/2026/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java#newcode2103 android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java:2103: int displayWidth = (int) (deviceInfo.getDisplayWidth() ...
7 years, 11 months ago (2013-01-18 00:39:50 UTC) #24
jamesr
content/renderer lgtm
7 years, 11 months ago (2013-01-18 00:53:30 UTC) #25
Nico
lgtm (ruslan checked with oshima and pkotwicz that the new constants shouldn't surprise the asset ...
7 years, 11 months ago (2013-01-18 01:27:33 UTC) #26
joth
aw/ lgtm
7 years, 11 months ago (2013-01-18 01:41:04 UTC) #27
aruslan
Thank you very much for reviews! https://chromiumcodereview.appspot.com/11886074/diff/28001/ui/base/layout.cc File ui/base/layout.cc (right): https://chromiumcodereview.appspot.com/11886074/diff/28001/ui/base/layout.cc#newcode85 ui/base/layout.cc:85: for (int i ...
7 years, 11 months ago (2013-01-18 03:21:07 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aruslan@chromium.org/11886074/45001
7 years, 11 months ago (2013-01-23 23:04:14 UTC) #29
commit-bot: I haz the power
7 years, 11 months ago (2013-01-24 01:50:13 UTC) #30
Message was sent while issue was closed.
Change committed as 178472

Powered by Google App Engine
This is Rietveld 408576698