summaryrefslogtreecommitdiffstats
path: root/android_webview/java
diff options
context:
space:
mode:
authormnaganov@chromium.org <mnaganov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 11:59:57 +0000
committermnaganov@chromium.org <mnaganov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 11:59:57 +0000
commit02a7c27975b17d4098d8972e6082180a177e4736 (patch)
tree4f082bebac7c532f3d649e82bf4afa051fcb4e02 /android_webview/java
parent45f23e891232e925a1fb32485ebbd0fbd7769884 (diff)
downloadchromium_src-02a7c27975b17d4098d8972e6082180a177e4736.zip
chromium_src-02a7c27975b17d4098d8972e6082180a177e4736.tar.gz
chromium_src-02a7c27975b17d4098d8972e6082180a177e4736.tar.bz2
[Android] Remove "Chrome" and "View" personalities
The content layer code is now by default operates in the "Chrome" mode. All WebView customizations are applied in the android_webview layer. BUG=b/8296421 R=benm@chromium.org, bulach@chromium.org, jochen@chromium.org, joth@chromium.org Review URL: https://codereview.chromium.org/14821004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198877 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/java')
-rw-r--r--android_webview/java/src/org/chromium/android_webview/AwContents.java10
1 files changed, 6 insertions, 4 deletions
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 683304f..17bfdb5 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);