OLD | NEW |
(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 } |
| 19 |
| 20 assert false : "enumeratedId '" + enumeratedId + "' was out of range."; |
| 21 return R.drawable.missing; |
| 22 } |
| 23 } |
OLD | NEW |