| Index: android_webview/java/src/org/chromium/android_webview/AwResource.java
|
| diff --git a/android_webview/java/src/org/chromium/android_webview/AwResource.java b/android_webview/java/src/org/chromium/android_webview/AwResource.java
|
| index 829f243b11a4c3f60f88b1a4ad29f4d0c90c1dc7..7051acbcd4dbcfa787c4040a88085b24e8d5d9fe 100644
|
| --- a/android_webview/java/src/org/chromium/android_webview/AwResource.java
|
| +++ b/android_webview/java/src/org/chromium/android_webview/AwResource.java
|
| @@ -17,6 +17,10 @@ import java.util.Map;
|
| import java.util.NoSuchElementException;
|
| import java.util.Scanner;
|
|
|
| +/**
|
| + * A class that defines a set of resource IDs and functionality to resolve
|
| + * those IDs to concrete resources.
|
| + */
|
| @JNINamespace("android_webview::AwResource")
|
| public class AwResource {
|
| // The following resource ID's must be initialized by the embedder.
|
| @@ -47,6 +51,15 @@ public class AwResource {
|
| sResourceCache = new HashMap<Integer, SoftReference<String> >();
|
| }
|
|
|
| + public static void setErrorPageResources(int loaderror, int nodomain) {
|
| + RAW_LOAD_ERROR = loaderror;
|
| + RAW_NO_DOMAIN = nodomain;
|
| + }
|
| +
|
| + public static void setDefaultTextEncoding(int encoding) {
|
| + STRING_DEFAULT_TEXT_ENCODING = encoding;
|
| + }
|
| +
|
| @CalledByNative
|
| public static String getDefaultTextEncoding() {
|
| return getResource(STRING_DEFAULT_TEXT_ENCODING, TYPE_STRING);
|
| @@ -109,6 +122,7 @@ public class AwResource {
|
| isr.close();
|
| }
|
| } catch (IOException e) {
|
| + // Nothing to do if close() fails.
|
| }
|
| }
|
| return result;
|
|
|