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

Issue 14772036: Let Android port access properly sized images (Closed)

Created:
7 years, 7 months ago by gone
Modified:
7 years, 7 months ago
Reviewers:
nyquist, Yaron, newt (away)
CC:
chromium-reviews, cjhopman, joth, benm (inactive), jochen (gone - plz use gerrit)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Let Android port access properly sized images Depends on assets in http://crrev.com/15136005, which had to be separated because of the trybots. With the way things are currently set up, Chrome on Android can't access properly sized image resources: * The APK only packages the mostly unused 100% resources (none of the larger 200% assets) * The bitmaps don't scale properly when they're converted to Java bitmaps because the Java code knows nothing about the resource's expected dimensions on different devices * The Chromium resource loading system doesn't allow us to take advantage of Android's resource loading schemes (drawable directories for different screen sizes, RTL support, etc.). Instead of #ifdefing out practically everything in the theme_resources.grd file, this CL introduces a map between the chromium resource IDs and Android drawables, allowing us to load up the correctly sized Android assets. The template system is bootstrapped with the InfoBar and WebsiteSettingsUI icon assets. TBR=jochen BUG=237034, 238668 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=201328

Patch Set 1 #

Patch Set 2 : Making static #

Patch Set 3 : Switched invalid ID to 0 #

Patch Set 4 : Reworking slightly #

Patch Set 5 : Change const definition #

Patch Set 6 : Fixed gypi file #

Patch Set 7 : Squashing two #

Patch Set 8 : Separating image assets #

Patch Set 9 : Newline adjustments #

Patch Set 10 : Removed header guard comment #

Total comments: 16

Patch Set 11 : Addressing comments #

Total comments: 8

Patch Set 12 : Nits #

Patch Set 13 : Squshed together the wrong CLs #

Patch Set 14 : Clang fix, maybe #

Patch Set 15 : Cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+184 lines, -21 lines) Patch
M build/android/java_cpp_template.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -2 lines 0 comments Download
A chrome/android/java/ResourceId.template View 1 2 3 4 5 6 7 8 9 10 1 chunk +23 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -2 lines 0 comments Download
A chrome/browser/android/resource_id.h View 1 2 3 4 5 6 7 8 9 1 chunk +50 lines, -0 lines 0 comments Download
A chrome/browser/android/resource_mapper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +28 lines, -0 lines 0 comments Download
A chrome/browser/android/resource_mapper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +44 lines, -0 lines 0 comments Download
M chrome/browser/ui/android/website_settings_popup_android.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +12 lines, -17 lines 0 comments Download
M chrome/chrome.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +15 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
gone
Strangely, the issue I was having with the map being incorrect went away after a ...
7 years, 7 months ago (2013-05-14 21:06:36 UTC) #1
joth
+benm
7 years, 7 months ago (2013-05-15 17:19:24 UTC) #2
gone
Actually having some issues getting the GYP changes correct... It seems that changing the resource_id.h ...
7 years, 7 months ago (2013-05-16 00:33:02 UTC) #3
gone
On 2013/05/16 00:33:02, dfalcantara wrote: > Actually having some issues getting the GYP changes correct... ...
7 years, 7 months ago (2013-05-16 01:12:15 UTC) #4
cjhopman
On 2013/05/16 00:33:02, dfalcantara wrote: > Actually having some issues getting the GYP changes correct... ...
7 years, 7 months ago (2013-05-16 19:52:48 UTC) #5
gone
On 2013/05/16 19:52:48, cjhopman wrote: > On 2013/05/16 00:33:02, dfalcantara wrote: > > Actually having ...
7 years, 7 months ago (2013-05-16 20:09:33 UTC) #6
gone
Adding Tommy here because he used templates for https://codereview.chromium.org/12313075
7 years, 7 months ago (2013-05-16 20:26:42 UTC) #7
gone
Alright, uploaded a fixed java_cpp_template.gypi file that properly triggers rebuilding. PTAL.
7 years, 7 months ago (2013-05-16 22:48:14 UTC) #8
gone
On 2013/05/16 22:48:14, dfalcantara wrote: > Alright, uploaded a fixed java_cpp_template.gypi file that properly triggers ...
7 years, 7 months ago (2013-05-16 23:16:13 UTC) #9
gone
Haven't heard anything from the WebView guys so I moved them to CC. Adding yfriedman ...
7 years, 7 months ago (2013-05-17 17:31:53 UTC) #10
joth
AFAICT as this is only chrome/ code it won't affect webview... thanks for ccing us ...
7 years, 7 months ago (2013-05-17 21:05:05 UTC) #11
gone
https://chromiumcodereview.appspot.com/14772036/diff/42001/chrome/browser/android/resource_id.h File chrome/browser/android/resource_id.h (right): https://chromiumcodereview.appspot.com/14772036/diff/42001/chrome/browser/android/resource_id.h#newcode6 chrome/browser/android/resource_id.h:6: #define CHROME_BROWSER_ANDROID_RESOURCE_ID_H_ On 2013/05/17 21:05:05, joth wrote: > normally ...
7 years, 7 months ago (2013-05-17 21:06:25 UTC) #12
gone
https://chromiumcodereview.appspot.com/14772036/diff/42001/chrome/browser/android/resource_id.h File chrome/browser/android/resource_id.h (right): https://chromiumcodereview.appspot.com/14772036/diff/42001/chrome/browser/android/resource_id.h#newcode6 chrome/browser/android/resource_id.h:6: #define CHROME_BROWSER_ANDROID_RESOURCE_ID_H_ On 2013/05/17 21:06:25, dfalcantara wrote: > On ...
7 years, 7 months ago (2013-05-17 22:04:31 UTC) #13
Yaron
https://chromiumcodereview.appspot.com/14772036/diff/42001/build/android/java_cpp_template.gypi File build/android/java_cpp_template.gypi (right): https://chromiumcodereview.appspot.com/14772036/diff/42001/build/android/java_cpp_template.gypi#newcode44 build/android/java_cpp_template.gypi:44: 'additional_input_paths': [ Can you add a comment about this ...
7 years, 7 months ago (2013-05-17 22:36:16 UTC) #14
gone
Accidentally re-based while trying to chase down some other thing :/ https://chromiumcodereview.appspot.com/14772036/diff/42001/build/android/java_cpp_template.gypi File build/android/java_cpp_template.gypi (right): ...
7 years, 7 months ago (2013-05-20 18:48:10 UTC) #15
Yaron
lgtm https://chromiumcodereview.appspot.com/14772036/diff/42001/chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java File chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java (right): https://chromiumcodereview.appspot.com/14772036/diff/42001/chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java#newcode68 chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java:68: private void addSection(int enumeratedIconID, String headline, String description) ...
7 years, 7 months ago (2013-05-20 20:54:25 UTC) #16
gone
Added jochen@ as TBR for the single-line change in chrome.gyp. https://chromiumcodereview.appspot.com/14772036/diff/54001/chrome/browser/android/resource_mapper.cc File chrome/browser/android/resource_mapper.cc (right): https://chromiumcodereview.appspot.com/14772036/diff/54001/chrome/browser/android/resource_mapper.cc#newcode15 ...
7 years, 7 months ago (2013-05-20 21:28:04 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dfalcantara@chromium.org/14772036/67001
7 years, 7 months ago (2013-05-21 01:11:46 UTC) #18
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 7 months ago (2013-05-21 01:42:00 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dfalcantara@chromium.org/14772036/80001
7 years, 7 months ago (2013-05-21 02:30:20 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dfalcantara@chromium.org/14772036/92001
7 years, 7 months ago (2013-05-21 03:10:46 UTC) #21
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) content_browsertests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=151362
7 years, 7 months ago (2013-05-21 10:01:59 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dfalcantara@chromium.org/14772036/92001
7 years, 7 months ago (2013-05-21 15:26:45 UTC) #23
commit-bot: I haz the power
7 years, 7 months ago (2013-05-21 17:32:33 UTC) #24
Message was sent while issue was closed.
Change committed as 201328

Powered by Google App Engine
This is Rietveld 408576698