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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwResource.java

Issue 333003003: aw: Support the platform specific key-systems. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added 'media/base/android/java' into android_webview/java/DEPS. Created 6 years, 6 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: 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 ee658e4f24226f20a4904647bfbb1de57265a4c7..3b3b3265f491eb05273b71213f96f6dbff091bbe 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwResource.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwResource.java
@@ -35,6 +35,9 @@ public class AwResource {
// String resource ID for the default text encoding to use.
private static int STRING_DEFAULT_TEXT_ENCODING;
+ // Array resource ID for the configuration of platform specific key-systems.
+ private static int STRING_ARRAY_CONFIG_KEY_SYSTEM_UUID_MAPPING;
+
// The embedder should inject a Resources object that will be used
// to resolve Resource IDs into the actual resources.
private static Resources sResources;
@@ -59,6 +62,10 @@ public class AwResource {
STRING_DEFAULT_TEXT_ENCODING = encoding;
}
+ public static void setConfigKeySystemUuidMapping(int config) {
+ STRING_ARRAY_CONFIG_KEY_SYSTEM_UUID_MAPPING = config;
+ }
+
@CalledByNative
public static String getDefaultTextEncoding() {
return getResource(STRING_DEFAULT_TEXT_ENCODING, TYPE_STRING);
@@ -74,6 +81,11 @@ public class AwResource {
return getResource(RAW_LOAD_ERROR, TYPE_RAW);
}
+ public static String[] getConfigKeySystemUuidMapping() {
+ // No need to cache, since this should be called only once.
+ return sResources.getStringArray(STRING_ARRAY_CONFIG_KEY_SYSTEM_UUID_MAPPING);
+ }
+
private static String getResource(int resid, int type) {
assert resid != 0;
assert sResources != null;

Powered by Google App Engine
This is Rietveld 408576698