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

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

Issue 14821004: [Android] Remove "Chrome" and "View" personalities (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update findbugs Created 7 years, 7 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 | « no previous file | build/android/findbugs_filter/findbugs_known_bugs.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/java/src/org/chromium/android_webview/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index 683304fd6cb9460e2ee3758848a6d86ab9c8490a..17bfdb5d1d2ac29b5e436d156161098e7d3e37d9 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -315,8 +315,7 @@ public class AwContents {
mDIPScale = DeviceDisplayInfo.create(containerView.getContext()).getDIPScale();
// Note that ContentViewCore must be set up before AwContents, as ContentViewCore
// setup performs process initialisation work needed by AwContents.
- mContentViewCore = new ContentViewCore(containerView.getContext(),
- ContentViewCore.PERSONALITY_VIEW);
+ mContentViewCore = new ContentViewCore(containerView.getContext());
mContentViewCore.setPinchGestureStateListener(new AwPinchGestureStateListener());
mContentsClientBridge = new AwContentsClientBridge(contentsClient);
mLayoutSizer = layoutSizer;
@@ -529,6 +528,10 @@ public class AwContents {
params.setTransitionType(PageTransitionTypes.PAGE_TRANSITION_RELOAD);
}
+ // For WebView, always use the user agent override, which is set
+ // every time the user agent in AwSettings is modified.
+ params.setOverrideUserAgent(LoadUrlParams.UA_OVERRIDE_TRUE);
+
mContentViewCore.loadUrl(params);
suppressInterceptionForThisNavigation();
@@ -573,8 +576,7 @@ public class AwContents {
private void setNewWebContents(int newWebContentsPtr) {
// When setting a new WebContents, we new up a ContentViewCore that will
// wrap it and then swap it.
- ContentViewCore newCore = new ContentViewCore(mContainerView.getContext(),
- ContentViewCore.PERSONALITY_VIEW);
+ ContentViewCore newCore = new ContentViewCore(mContainerView.getContext());
newCore.initialize(mContainerView, mInternalAccessAdapter, newWebContentsPtr, null);
newCore.setContentViewClient(mContentsClient.getContentViewClient());
newCore.setZoomControlsDelegate(mZoomControls);
« no previous file with comments | « no previous file | build/android/findbugs_filter/findbugs_known_bugs.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698