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

Unified 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: Cleanup 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/ResourceId.template
diff --git a/chrome/android/java/ResourceId.template b/chrome/android/java/ResourceId.template
new file mode 100644
index 0000000000000000000000000000000000000000..4894b5c47bf07880b84ad10482e7ea5d7e5a0476
--- /dev/null
+++ b/chrome/android/java/ResourceId.template
@@ -0,0 +1,23 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser;
+
+import org.chromium.chrome.R;
+
+public class ResourceId {
+ public static int mapToDrawableId(int enumeratedId) {
+ int[] resourceList = {
+#define DEFINE_RESOURCE_ID(c_id,java_id) java_id,
+#include "chrome/browser/android/resource_id.h"
+ };
+
+ if (enumeratedId >= 0 && enumeratedId < resourceList.length) {
+ return resourceList[enumeratedId];
+ }
+
+ assert false : "enumeratedId '" + enumeratedId + "' was out of range.";
+ return R.drawable.missing;
+ }
+}
« no previous file with comments | « build/android/java_cpp_template.gypi ('k') | chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698