diff options
-rw-r--r-- | android_webview/Android.mk | 3 | ||||
-rw-r--r-- | ui/android/java/resource_map/org/chromium/ui/R.java | 22 |
2 files changed, 24 insertions, 1 deletions
diff --git a/android_webview/Android.mk b/android_webview/Android.mk index 3d40754..948e1e7 100644 --- a/android_webview/Android.mk +++ b/android_webview/Android.mk @@ -17,7 +17,8 @@ LOCAL_SRC_FILES := $(call all-java-files-under, java/src) # resource glue layer LOCAL_SRC_FILES += \ - $(call all-java-files-under, ../content/public/android/java/resource_map) + $(call all-java-files-under, ../content/public/android/java/resource_map) \ + $(call all-java-files-under, ../ui/android/java/resource_map) \ # contentview and its dependencies LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/../content/public/android/java/src diff --git a/ui/android/java/resource_map/org/chromium/ui/R.java b/ui/android/java/resource_map/org/chromium/ui/R.java new file mode 100644 index 0000000..53f60cc --- /dev/null +++ b/ui/android/java/resource_map/org/chromium/ui/R.java @@ -0,0 +1,22 @@ +// Copyright (c) 2012 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.ui; + +/** + * Provide Android internal resources to Chrome's ui layer. This allows classes + * that access resources via org.chromium.ui.R to function properly in webview. + * In a normal Chrome build, ui resources live in a res folder in the ui layer + * and the org.chromium.ui.R class is generated at build time based on these + * resources. In webview, resources live in the Android framework and can't be + * accessed directly from the ui layer. Instead, we copy resources needed by ui + * into the Android framework and use this R class to map resources IDs from + * org.chromium.ui.R to com.android.internal.R. + */ +public final class R { + public static final class string { + public static int low_memory_error; + public static int opening_file_error; + } +} |