OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.content.browser; | 5 package org.chromium.content.browser; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.content.res.Configuration; | 9 import android.content.res.Configuration; |
10 import android.graphics.Bitmap; | 10 import android.graphics.Bitmap; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 return new JellyBeanContentView(context, nativeWebContents, windowAn
droid, attrs, | 102 return new JellyBeanContentView(context, nativeWebContents, windowAn
droid, attrs, |
103 defStyle, personality); | 103 defStyle, personality); |
104 } | 104 } |
105 } | 105 } |
106 | 106 |
107 protected ContentView(Context context, int nativeWebContents, WindowAndroid
windowAndroid, | 107 protected ContentView(Context context, int nativeWebContents, WindowAndroid
windowAndroid, |
108 AttributeSet attrs, int defStyle, int personality) { | 108 AttributeSet attrs, int defStyle, int personality) { |
109 super(context, attrs, defStyle); | 109 super(context, attrs, defStyle); |
110 | 110 |
111 mContentViewCore = new ContentViewCore(context, personality); | 111 mContentViewCore = new ContentViewCore(context, personality); |
112 mContentViewCore.initialize(this, this, nativeWebContents, windowAndroid
, false); | 112 mContentViewCore.initialize(this, this, nativeWebContents, windowAndroid
); |
113 } | 113 } |
114 | 114 |
115 // PageInfo implementation. | 115 // PageInfo implementation. |
116 | 116 |
117 @Override | 117 @Override |
118 public String getUrl() { | 118 public String getUrl() { |
119 return mContentViewCore.getUrl(); | 119 return mContentViewCore.getUrl(); |
120 } | 120 } |
121 | 121 |
122 @Override | 122 @Override |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 * Load url without fixing up the url string. Consumers of ContentView are r
esponsible for | 222 * Load url without fixing up the url string. Consumers of ContentView are r
esponsible for |
223 * ensuring the URL passed in is properly formatted (i.e. the scheme has bee
n added if left | 223 * ensuring the URL passed in is properly formatted (i.e. the scheme has bee
n added if left |
224 * off during user input). | 224 * off during user input). |
225 * | 225 * |
226 * @param params Parameters for this load. | 226 * @param params Parameters for this load. |
227 */ | 227 */ |
228 public void loadUrl(LoadUrlParams params) { | 228 public void loadUrl(LoadUrlParams params) { |
229 mContentViewCore.loadUrl(params); | 229 mContentViewCore.loadUrl(params); |
230 } | 230 } |
231 | 231 |
232 void setAllUserAgentOverridesInHistory() { | |
233 mContentViewCore.setAllUserAgentOverridesInHistory(); | |
234 } | |
235 | |
236 /** | 232 /** |
237 * Stops loading the current web contents. | 233 * Stops loading the current web contents. |
238 */ | 234 */ |
239 public void stopLoading() { | 235 public void stopLoading() { |
240 mContentViewCore.stopLoading(); | 236 mContentViewCore.stopLoading(); |
241 } | 237 } |
242 | 238 |
243 /** | 239 /** |
244 * @return Whether the current WebContents has a previous navigation entry. | 240 * @return Whether the current WebContents has a previous navigation entry. |
245 */ | 241 */ |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 | 826 |
831 @Override | 827 @Override |
832 public boolean super_awakenScrollBars(int startDelay, boolean invalidate) { | 828 public boolean super_awakenScrollBars(int startDelay, boolean invalidate) { |
833 return super.awakenScrollBars(startDelay, invalidate); | 829 return super.awakenScrollBars(startDelay, invalidate); |
834 } | 830 } |
835 | 831 |
836 ////////////////////////////////////////////////////////////////////////////
/////////////////// | 832 ////////////////////////////////////////////////////////////////////////////
/////////////////// |
837 // End Implementation of ContentViewCore.InternalAccessDelega
te // | 833 // End Implementation of ContentViewCore.InternalAccessDelega
te // |
838 ////////////////////////////////////////////////////////////////////////////
/////////////////// | 834 ////////////////////////////////////////////////////////////////////////////
/////////////////// |
839 } | 835 } |
OLD | NEW |