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.
5 #ifndef CHROME_BROWSER_ANDROID_RESOURCE_MAPPER_H_
6 #define CHROME_BROWSER_ANDROID_RESOURCE_MAPPER_H_
10 // Enumerates IDs of resources used in the Android port of Chromium. This is
11 // needed so that Android knows which Drawable is needed in the Java UI.
12 class ResourceMapper
{
14 // ID indicating that the map failed to find a Drawable corresponding to the
16 static const int kMissingId
;
18 // Converts the given chromium |resource_id| (e.g. IDR_INFOBAR_TRANSLATE) to
19 // an enumerated ID. Returns |kMissingId| if a mapping wasn't found.
20 static int MapFromChromiumId(int resource_id
);
23 // Create the mapping. IDs start at 0 to correspond to the array that gets
24 // built in the corresponding ResourceID Java class.
25 static void ConstructMap();
28 #endif // CHROME_BROWSER_ANDROID_RESOURCE_MAPPER_H_