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

Unified Diff: android_webview/native/aw_contents.cc

Issue 1172093002: Implement HttpUserAgentSettings delegate for Android WebView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | android_webview/native/aw_locale_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | android_webview/native/aw_locale_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698