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

Side by Side Diff: chrome/android/java/ResourceID.template

Issue 14772036: Let Android port access properly sized images (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed header guard comment Created 7 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 package org.chromium.chrome.browser;
6
7 import org.chromium.chrome.R;
8
9 public class ResourceID {
10 public static int mapToDrawableID(int enumeratedID) {
11 int[] resourceList = {
12 #define DEFINE_RESOURCE_ID(c_id,java_id) java_id,
13 #include "chrome/browser/android/resource_id.h"
14 };
15
16 if (enumeratedID >= 0 && enumeratedID < resourceList.length) {
17 return resourceList[enumeratedID];
18 } else {
Yaron 2013/05/17 22:36:16 No need for "else" since you return above.
gone 2013/05/20 18:48:10 Done.
19 assert false : "enumeratedID was out of range.";
Yaron 2013/05/17 22:36:16 add the failing id to the string?
gone 2013/05/20 18:48:10 Done.
20 return R.drawable.missing;
21 }
22 }
23 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698