Index: android_webview/native/aw_contents.cc |
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc |
index 58782a83c208964e36fded331efb7e40a849e4ac..7d34034e42363c1b5179b76048cf1a9aef29721a 100644 |
--- a/android_webview/native/aw_contents.cc |
+++ b/android_webview/native/aw_contents.cc |
@@ -110,6 +110,8 @@ bool g_should_download_favicons = false; |
bool g_force_auxiliary_bitmap_rendering = false; |
+std::string g_locale; |
+ |
const void* kAwContentsUserDataKey = &kAwContentsUserDataKey; |
class AwContentsUserData : public base::SupportsUserData::Data { |
@@ -157,6 +159,16 @@ AwContents* AwContents::FromID(int render_process_id, int render_view_id) { |
} |
// static |
+void SetLocale(JNIEnv* env, jclass, jstring locale) { |
+ g_locale = ConvertJavaStringToUTF8(env, locale); |
+} |
+ |
+// static |
+std::string AwContents::GetLocale() { |
+ return g_locale; |
+} |
+ |
+// static |
AwBrowserPermissionRequestDelegate* AwBrowserPermissionRequestDelegate::FromID( |
int render_process_id, int render_frame_id) { |
AwContents* aw_contents = AwContents::FromWebContents( |