blob: 5e5e23c475089a269d70d04e52bb6475049b0734 [file] [log] [blame]
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001/*
2 * Copyright (C) 2007 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.webkit;
18
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070019import android.os.Message;
Selim Gurun0ea6dad2012-03-29 18:19:01 -070020import android.os.Build;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070021
22/**
23 * Manages settings state for a WebView. When a WebView is first created, it
24 * obtains a set of default settings. These default settings will be returned
25 * from any getter call. A WebSettings object obtained from
26 * WebView.getSettings() is tied to the life of the WebView. If a WebView has
27 * been destroyed, any method call on WebSettings will throw an
28 * IllegalStateException.
29 */
Jonathan Dixond3101b12012-04-12 20:51:51 +010030// This is an abstract base class: concrete WebViewProviders must
Jonathan Dixon3c909522012-02-28 18:45:06 +000031// create a class derived from this, and return an instance of it in the
32// WebViewProvider.getWebSettingsProvider() method implementation.
Selim Gurun0ea6dad2012-03-29 18:19:01 -070033public abstract class WebSettings {
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070034 /**
35 * Enum for controlling the layout of html.
Steve Block4e584df2012-04-24 23:12:47 +010036 * <ul>
37 * <li>NORMAL means no rendering changes.</li>
38 * <li>SINGLE_COLUMN moves all content into one column that is the width of the
39 * view.</li>
40 * <li>NARROW_COLUMNS makes all columns no wider than the screen if possible.</li>
41 * </ul>
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070042 */
43 // XXX: These must match LayoutAlgorithm in Settings.h in WebCore.
44 public enum LayoutAlgorithm {
45 NORMAL,
John Reck5a1ef4132011-10-26 10:37:00 -070046 /**
47 * @deprecated This algorithm is now obsolete.
48 */
49 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070050 SINGLE_COLUMN,
51 NARROW_COLUMNS
52 }
53
54 /**
55 * Enum for specifying the text size.
Steve Block4e584df2012-04-24 23:12:47 +010056 * <ul>
57 * <li>SMALLEST is 50%</li>
58 * <li>SMALLER is 75%</li>
59 * <li>NORMAL is 100%</li>
60 * <li>LARGER is 150%</li>
61 * <li>LARGEST is 200%</li>
62 * </ul>
63 *
John Reckcaeb1202011-06-17 11:50:15 -070064 * @deprecated Use {@link WebSettings#setTextZoom(int)} and {@link WebSettings#getTextZoom()} instead.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070065 */
66 public enum TextSize {
67 SMALLEST(50),
68 SMALLER(75),
69 NORMAL(100),
70 LARGER(150),
71 LARGEST(200);
72 TextSize(int size) {
73 value = size;
74 }
75 int value;
76 }
Grace Kloba0d8b77c2009-06-25 11:20:51 -070077
78 /**
79 * Enum for specifying the WebView's desired density.
Steve Block4e584df2012-04-24 23:12:47 +010080 * <ul>
81 * <li>FAR makes 100% looking like in 240dpi</li>
82 * <li>MEDIUM makes 100% looking like in 160dpi</li>
83 * <li>CLOSE makes 100% looking like in 120dpi</li>
84 * </ul>
Grace Kloba0d8b77c2009-06-25 11:20:51 -070085 */
86 public enum ZoomDensity {
87 FAR(150), // 240dpi
88 MEDIUM(100), // 160dpi
89 CLOSE(75); // 120dpi
90 ZoomDensity(int size) {
91 value = size;
92 }
93 int value;
94 }
95
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070096 /**
Steve Block4e584df2012-04-24 23:12:47 +010097 * Default cache usage pattern. Use with {@link #setCacheMode}.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070098 */
99 public static final int LOAD_DEFAULT = -1;
100
101 /**
Steve Block4e584df2012-04-24 23:12:47 +0100102 * Normal cache usage pattern. Use with {@link #setCacheMode}.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700103 */
104 public static final int LOAD_NORMAL = 0;
105
106 /**
Steve Block4e584df2012-04-24 23:12:47 +0100107 * Use cache if content is there, even if expired (eg, history nav).
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700108 * If it is not in the cache, load from network.
109 * Use with {@link #setCacheMode}.
110 */
111 public static final int LOAD_CACHE_ELSE_NETWORK = 1;
112
113 /**
Steve Block4e584df2012-04-24 23:12:47 +0100114 * Don't use the cache, load from network.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700115 * Use with {@link #setCacheMode}.
116 */
117 public static final int LOAD_NO_CACHE = 2;
Michael Kolba172e7d2010-06-30 12:35:26 -0700118
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700119 /**
120 * Don't use the network, load from cache only.
121 * Use with {@link #setCacheMode}.
122 */
123 public static final int LOAD_CACHE_ONLY = 3;
124
125 public enum RenderPriority {
126 NORMAL,
127 HIGH,
128 LOW
129 }
130
Patrick Scott300f2e92010-03-22 10:20:45 -0400131 /**
132 * The plugin state effects how plugins are treated on a page. ON means
133 * that any object will be loaded even if a plugin does not exist to handle
134 * the content. ON_DEMAND means that if there is a plugin installed that
135 * can handle the content, a placeholder is shown until the user clicks on
136 * the placeholder. Once clicked, the plugin will be enabled on the page.
137 * OFF means that all plugins will be turned off and any fallback content
138 * will be used.
139 */
140 public enum PluginState {
141 ON,
142 ON_DEMAND,
143 OFF
144 }
145
Ben Murdoche9e3ccd2010-10-06 14:33:02 +0100146 /**
Jonathan Dixon3c909522012-02-28 18:45:06 +0000147 * Hidden constructor to prevent clients from creating a new settings
148 * instance or deriving the class.
Steve Block4e584df2012-04-24 23:12:47 +0100149 *
Jonathan Dixon3c909522012-02-28 18:45:06 +0000150 * @hide
Ben Murdoche9e3ccd2010-10-06 14:33:02 +0100151 */
Jonathan Dixon3c909522012-02-28 18:45:06 +0000152 protected WebSettings() {
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -0800153 }
Michael Kolba172e7d2010-06-30 12:35:26 -0700154
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -0800155 /**
Steve Blockb0e0f332012-06-13 22:01:11 +0100156 * Enables dumping the pages navigation cache to a text file. The default
157 * is false.
Steve Block4e584df2012-04-24 23:12:47 +0100158 *
Kristian Monsenfc771652011-05-10 16:44:05 +0100159 * @deprecated This method is now obsolete.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700160 */
Kristian Monsenfc771652011-05-10 16:44:05 +0100161 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700162 public void setNavDump(boolean enabled) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000163 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700164 }
165
166 /**
Steve Block4e584df2012-04-24 23:12:47 +0100167 * Gets whether dumping the navigation cache is enabled.
168 *
Steve Blockb0e0f332012-06-13 22:01:11 +0100169 * @return whether dumping the navigation cache is enabled
170 * @see #setNavDump
Kristian Monsenfc771652011-05-10 16:44:05 +0100171 * @deprecated This method is now obsolete.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700172 */
Kristian Monsenfc771652011-05-10 16:44:05 +0100173 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700174 public boolean getNavDump() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000175 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700176 }
177
178 /**
Mikhail Naganovb533fb42012-04-05 14:50:02 +0100179 * Sets whether the WebView should support zooming using its on-screen zoom
180 * controls and gestures. The particular zoom mechanisms that should be used
181 * can be set with {@link #setBuiltInZoomControls}. This setting does not
182 * affect zooming performed using the {@link WebView#zoomIn()} and
Steve Block4e584df2012-04-24 23:12:47 +0100183 * {@link WebView#zoomOut()} methods. The default is true.
184 *
185 * @param support whether the WebView should support zoom
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700186 */
187 public void setSupportZoom(boolean support) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000188 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700189 }
190
191 /**
Steve Block4e584df2012-04-24 23:12:47 +0100192 * Gets whether the WebView supports zoom.
193 *
194 * @return true if the WebView supports zoom
195 * @see #setSupportZoom
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700196 */
197 public boolean supportZoom() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000198 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700199 }
200
201 /**
Steve Block06d268e2012-04-16 14:10:54 +0100202 * Sets whether the WebView should use its built-in zoom mechanisms. The
203 * built-in zoom mechanisms comprise on-screen zoom controls, which are
204 * displayed over the WebView's content, and the use of a pinch gesture to
205 * control zooming. Whether or not these on-screen controls are displayed
Steve Block4e584df2012-04-24 23:12:47 +0100206 * can be set with {@link #setDisplayZoomControls}. The default is false.
Steve Block06d268e2012-04-16 14:10:54 +0100207 * <p>
208 * The built-in mechanisms are the only currently supported zoom
209 * mechanisms, so it is recommended that this setting is always enabled.
Steve Block4e584df2012-04-24 23:12:47 +0100210 *
211 * @param enabled whether the WebView should use its built-in zoom mechanisms
The Android Open Source Project10592532009-03-18 17:39:46 -0700212 */
Steve Block06d268e2012-04-16 14:10:54 +0100213 // This method was intended to select between the built-in zoom mechanisms
214 // and the separate zoom controls. The latter were obtained using
215 // {@link WebView#getZoomControls}, which is now hidden.
The Android Open Source Project10592532009-03-18 17:39:46 -0700216 public void setBuiltInZoomControls(boolean enabled) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000217 throw new MustOverrideException();
The Android Open Source Project10592532009-03-18 17:39:46 -0700218 }
Michael Kolba172e7d2010-06-30 12:35:26 -0700219
The Android Open Source Project10592532009-03-18 17:39:46 -0700220 /**
Steve Block4e584df2012-04-24 23:12:47 +0100221 * Gets whether the zoom mechanisms built into WebView are being used.
222 *
223 * @return true if the zoom mechanisms built into WebView are being used
224 * @see #setBuiltInZoomControls
The Android Open Source Project10592532009-03-18 17:39:46 -0700225 */
226 public boolean getBuiltInZoomControls() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000227 throw new MustOverrideException();
The Android Open Source Project10592532009-03-18 17:39:46 -0700228 }
Michael Kolba172e7d2010-06-30 12:35:26 -0700229
The Android Open Source Project10592532009-03-18 17:39:46 -0700230 /**
Mikhail Naganovb533fb42012-04-05 14:50:02 +0100231 * Sets whether the WebView should display on-screen zoom controls when
232 * using the built-in zoom mechanisms. See {@link #setBuiltInZoomControls}.
Steve Block4e584df2012-04-24 23:12:47 +0100233 * The default is true.
234 *
235 * @param enabled whether the WebView should display on-screen zoom controls
Michael Kolb6fe3b422010-08-19 12:41:24 -0700236 */
237 public void setDisplayZoomControls(boolean enabled) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000238 throw new MustOverrideException();
Michael Kolb6fe3b422010-08-19 12:41:24 -0700239 }
240
241 /**
Steve Block4e584df2012-04-24 23:12:47 +0100242 * Gets whether the WebView displays on-screen zoom controls when using
Mikhail Naganovb533fb42012-04-05 14:50:02 +0100243 * the built-in zoom mechanisms.
Steve Block4e584df2012-04-24 23:12:47 +0100244 *
245 * @return true if the WebView displays on-screen zoom controls when using
246 * the built-in zoom mechanisms
247 * @see #setDisplayZoomControls
Michael Kolb6fe3b422010-08-19 12:41:24 -0700248 */
249 public boolean getDisplayZoomControls() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000250 throw new MustOverrideException();
Michael Kolb6fe3b422010-08-19 12:41:24 -0700251 }
252
253 /**
Steve Block4e584df2012-04-24 23:12:47 +0100254 * Enables or disables file access within WebView. File access is enabled by
Patrick Scottd1737ed2011-01-05 11:36:48 -0500255 * default. Note that this enables or disables file system access only.
256 * Assets and resources are still accessible using file:///android_asset and
257 * file:///android_res.
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -0800258 */
259 public void setAllowFileAccess(boolean allow) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000260 throw new MustOverrideException();
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -0800261 }
262
263 /**
Steve Block4e584df2012-04-24 23:12:47 +0100264 * Gets whether this WebView supports file access.
265 *
266 * @see #setAllowFileAccess
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -0800267 */
268 public boolean getAllowFileAccess() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000269 throw new MustOverrideException();
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -0800270 }
271
272 /**
Steve Block4e584df2012-04-24 23:12:47 +0100273 * Enables or disables content URL access within WebView. Content URL
274 * access allows WebView to load content from a content provider installed
275 * in the system. The default is enabled.
Patrick Scottd1737ed2011-01-05 11:36:48 -0500276 */
277 public void setAllowContentAccess(boolean allow) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000278 throw new MustOverrideException();
Patrick Scottd1737ed2011-01-05 11:36:48 -0500279 }
280
281 /**
Steve Block4e584df2012-04-24 23:12:47 +0100282 * Gets whether this WebView supports content URL access.
283 *
284 * @see #setAllowContentAccess
Patrick Scottd1737ed2011-01-05 11:36:48 -0500285 */
286 public boolean getAllowContentAccess() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000287 throw new MustOverrideException();
Patrick Scottd1737ed2011-01-05 11:36:48 -0500288 }
289
290 /**
Steve Blockb0e0f332012-06-13 22:01:11 +0100291 * Sets whether the WebView loads pages in overview mode. The default is
292 * false.
Grace Klobae397a882009-08-06 12:04:14 -0700293 */
294 public void setLoadWithOverviewMode(boolean overview) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000295 throw new MustOverrideException();
Grace Klobae397a882009-08-06 12:04:14 -0700296 }
297
298 /**
Steve Blockb0e0f332012-06-13 22:01:11 +0100299 * Gets whether this WebView loads pages in overview mode.
300 *
301 * @return whether this WebView loads pages in overview mode
302 * @see #setLoadWithOverviewMode
Grace Klobae397a882009-08-06 12:04:14 -0700303 */
304 public boolean getLoadWithOverviewMode() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000305 throw new MustOverrideException();
Grace Klobae397a882009-08-06 12:04:14 -0700306 }
307
308 /**
Steve Block4e584df2012-04-24 23:12:47 +0100309 * Sets whether the WebView will enable smooth transition while panning or
Adam Powelle00e8a782011-09-11 17:48:42 -0700310 * zooming or while the window hosting the WebView does not have focus.
311 * If it is true, WebView will choose a solution to maximize the performance.
312 * e.g. the WebView's content may not be updated during the transition.
313 * If it is false, WebView will keep its fidelity. The default value is false.
Grace Klobaf9b731d2010-06-21 19:23:57 -0700314 */
315 public void setEnableSmoothTransition(boolean enable) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000316 throw new MustOverrideException();
Grace Klobaf9b731d2010-06-21 19:23:57 -0700317 }
Steve Block4e584df2012-04-24 23:12:47 +0100318
Grace Klobaf9b731d2010-06-21 19:23:57 -0700319 /**
Steve Block4e584df2012-04-24 23:12:47 +0100320 * Gets whether the WebView enables smooth transition while panning or
Grace Klobaf9b731d2010-06-21 19:23:57 -0700321 * zooming.
Steve Block4e584df2012-04-24 23:12:47 +0100322 *
323 * @see #setEnableSmoothTransition
Grace Klobaf9b731d2010-06-21 19:23:57 -0700324 */
325 public boolean enableSmoothTransition() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000326 throw new MustOverrideException();
Grace Klobaf9b731d2010-06-21 19:23:57 -0700327 }
328
329 /**
Steve Block4e584df2012-04-24 23:12:47 +0100330 * Sets whether the WebView uses its background for over scroll background.
Adam Powell637d3372010-08-25 14:37:03 -0700331 * If true, it will use the WebView's background. If false, it will use an
332 * internal pattern. Default is true.
Steve Block4e584df2012-04-24 23:12:47 +0100333 *
Kristian Monsenfc771652011-05-10 16:44:05 +0100334 * @deprecated This method is now obsolete.
Adam Powell637d3372010-08-25 14:37:03 -0700335 */
Kristian Monsenfc771652011-05-10 16:44:05 +0100336 @Deprecated
Adam Powell637d3372010-08-25 14:37:03 -0700337 public void setUseWebViewBackgroundForOverscrollBackground(boolean view) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000338 throw new MustOverrideException();
Adam Powell637d3372010-08-25 14:37:03 -0700339 }
340
341 /**
Steve Block4e584df2012-04-24 23:12:47 +0100342 * Gets whether this WebView uses WebView's background instead of
Adam Powell637d3372010-08-25 14:37:03 -0700343 * internal pattern for over scroll background.
Steve Block4e584df2012-04-24 23:12:47 +0100344 *
345 * @see #setUseWebViewBackgroundForOverscrollBackground
Kristian Monsenfc771652011-05-10 16:44:05 +0100346 * @deprecated This method is now obsolete.
Adam Powell637d3372010-08-25 14:37:03 -0700347 */
Kristian Monsenfc771652011-05-10 16:44:05 +0100348 @Deprecated
Adam Powell637d3372010-08-25 14:37:03 -0700349 public boolean getUseWebViewBackgroundForOverscrollBackground() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000350 throw new MustOverrideException();
Adam Powell637d3372010-08-25 14:37:03 -0700351 }
352
353 /**
Steve Blockb0e0f332012-06-13 22:01:11 +0100354 * Sets whether the WebView should save form data. The default is true,
355 * unless in private browsing mode, when the value is always false.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700356 */
357 public void setSaveFormData(boolean save) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000358 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700359 }
360
361 /**
Steve Blockb0e0f332012-06-13 22:01:11 +0100362 * Gets whether the WebView saves form data. Always false in private
363 * browsing mode.
364 *
365 * @return whether the WebView saves form data
366 * @see #setSaveFormData
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700367 */
368 public boolean getSaveFormData() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000369 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700370 }
371
372 /**
Steve Blockb0e0f332012-06-13 22:01:11 +0100373 * Sets whether the WebView should save passwords. The default is true.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700374 */
375 public void setSavePassword(boolean save) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000376 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700377 }
378
379 /**
Steve Blockb0e0f332012-06-13 22:01:11 +0100380 * Gets whether the WebView saves passwords.
381 *
382 * @return whether the WebView saves passwords
383 * @see #setSavePassword
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700384 */
385 public boolean getSavePassword() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000386 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700387 }
388
389 /**
Steve Blockb0e0f332012-06-13 22:01:11 +0100390 * Sets the text zoom of the page in percent. The default is 100.
Steve Block4e584df2012-04-24 23:12:47 +0100391 *
Steve Blockb0e0f332012-06-13 22:01:11 +0100392 * @param textZoom the text zoom in percent
John Reckff56bcd2011-06-16 17:12:08 -0700393 */
394 public synchronized void setTextZoom(int textZoom) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000395 throw new MustOverrideException();
John Reckff56bcd2011-06-16 17:12:08 -0700396 }
397
398 /**
Steve Block4e584df2012-04-24 23:12:47 +0100399 * Gets the text zoom of the page in percent.
400 *
Steve Blockb0e0f332012-06-13 22:01:11 +0100401 * @return the text zoom of the page in percent
Steve Block4e584df2012-04-24 23:12:47 +0100402 * @see #setTextSizeZoom
John Reckff56bcd2011-06-16 17:12:08 -0700403 */
404 public synchronized int getTextZoom() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000405 throw new MustOverrideException();
John Reckff56bcd2011-06-16 17:12:08 -0700406 }
407
408 /**
Steve Blockb0e0f332012-06-13 22:01:11 +0100409 * Sets the text size of the page. The default is {@link TextSize#NORMAL}.
Steve Block4e584df2012-04-24 23:12:47 +0100410 *
Steve Blockb0e0f332012-06-13 22:01:11 +0100411 * @param t the text size as a {@link TextSize} value
412 * @deprecated Use {@link #setTextZoom} instead.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700413 */
414 public synchronized void setTextSize(TextSize t) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000415 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700416 }
417
418 /**
Steve Block4e584df2012-04-24 23:12:47 +0100419 * Gets the text size of the page. If the text size was previously specified
Steve Blockb0e0f332012-06-13 22:01:11 +0100420 * in percent using {@link #setTextZoom}, this will return the closest
421 * matching {@link TextSize}.
Steve Block4e584df2012-04-24 23:12:47 +0100422 *
Steve Blockb0e0f332012-06-13 22:01:11 +0100423 * @return the text size as a {@link TextSize} value
424 * @see #setTextSize
425 * @deprecated Use {@link #getTextZoom} instead.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700426 */
427 public synchronized TextSize getTextSize() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000428 throw new MustOverrideException();
Mangesh Ghiwareedb528e2011-10-12 14:25:41 -0700429 }
430
431 /**
Steve Blockb0e0f332012-06-13 22:01:11 +0100432 * Sets the default zoom density of the page. This must be called from the UI
433 * thread. The default is {@link ZoomDensity#MEDIUM}.
Steve Block4e584df2012-04-24 23:12:47 +0100434 *
Steve Blockb0e0f332012-06-13 22:01:11 +0100435 * @param zoom the zoom density
Grace Kloba0d8b77c2009-06-25 11:20:51 -0700436 */
437 public void setDefaultZoom(ZoomDensity zoom) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000438 throw new MustOverrideException();
Grace Kloba0d8b77c2009-06-25 11:20:51 -0700439 }
440
441 /**
Steve Blockb0e0f332012-06-13 22:01:11 +0100442 * Gets the default zoom density of the page. This should be called from
443 * the UI thread.
444 *
445 * @return the zoom density
446 * @see #setDefaultZoom
Grace Kloba0d8b77c2009-06-25 11:20:51 -0700447 */
448 public ZoomDensity getDefaultZoom() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000449 throw new MustOverrideException();
Grace Kloba0d8b77c2009-06-25 11:20:51 -0700450 }
451
452 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700453 * Enables using light touches to make a selection and activate mouseovers.
Steve Blockb0e0f332012-06-13 22:01:11 +0100454 * The default is false.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700455 */
456 public void setLightTouchEnabled(boolean enabled) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000457 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700458 }
459
460 /**
Steve Block4e584df2012-04-24 23:12:47 +0100461 * Gets whether light touches are enabled.
Steve Blockb0e0f332012-06-13 22:01:11 +0100462 *
463 * @return whether light touches are enabled
464 * @see #setLightTouchEnabled
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700465 */
466 public boolean getLightTouchEnabled() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000467 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700468 }
469
470 /**
Steve Block4e584df2012-04-24 23:12:47 +0100471 * Controlled a rendering optimization that is no longer present. Setting
472 * it now has no effect.
473 *
474 * @deprecated This setting now has no effect.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700475 */
Mike Hearnadcd2ed2009-01-21 16:44:36 +0100476 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700477 public synchronized void setUseDoubleTree(boolean use) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000478 // Specified to do nothing, so no need for derived classes to override.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700479 }
480
481 /**
Steve Block4e584df2012-04-24 23:12:47 +0100482 * Controlled a rendering optimization that is no longer present. Setting
483 * it now has no effect.
484 *
485 * @deprecated This setting now has no effect.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700486 */
Mike Hearnadcd2ed2009-01-21 16:44:36 +0100487 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700488 public synchronized boolean getUseDoubleTree() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000489 // Returns false unconditionally, so no need for derived classes to override.
Mike Hearnadcd2ed2009-01-21 16:44:36 +0100490 return false;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700491 }
492
493 /**
Steve Blockb0e0f332012-06-13 22:01:11 +0100494 * Sets the user-agent string using an integer code.
495 * <ul>
496 * <li>0 means the WebView should use an Android user-agent string</li>
497 * <li>1 means the WebView should use a desktop user-agent string</li>
498 * </ul>
499 * Other values are ignored. The default is an Android user-agent string,
500 * i.e. code value 0.
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -0800501 *
Steve Blockb0e0f332012-06-13 22:01:11 +0100502 * @param ua the integer code for the user-agent string
503 * @deprecated Please use {@link #setUserAgentString} instead.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700504 */
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -0800505 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700506 public synchronized void setUserAgent(int ua) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000507 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700508 }
509
510 /**
Steve Blockb0e0f332012-06-13 22:01:11 +0100511 * Gets the user-agent as an integer code.
512 * <ul>
513 * <li>-1 means the WebView is using a custom user-agent string set with
514 * {@link #setUserAgentString}</li>
515 * <li>0 means the WebView should use an Android user-agent string</li>
516 * <li>1 means the WebView should use a desktop user-agent string</li>
517 * </ul>
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -0800518 *
Steve Blockb0e0f332012-06-13 22:01:11 +0100519 * @return the integer code for the user-agent string
520 * @see #setUserAgent
521 * @deprecated Please use {@link #getUserAgentString} instead.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700522 */
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -0800523 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700524 public synchronized int getUserAgent() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000525 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700526 }
527
528 /**
Steve Blockb0e0f332012-06-13 22:01:11 +0100529 * Tells the WebView to use a wide viewport. The default is false.
530 *
531 * @param use whether to use a wide viewport
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700532 */
533 public synchronized void setUseWideViewPort(boolean use) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000534 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700535 }
536
537 /**
Steve Block4e584df2012-04-24 23:12:47 +0100538 * Gets whether the WebView is using a wide viewport.
539 *
540 * @return true if the WebView is using a wide viewport
Steve Blockb0e0f332012-06-13 22:01:11 +0100541 * @see #setUseWideViewPort
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700542 */
543 public synchronized boolean getUseWideViewPort() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000544 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700545 }
546
547 /**
Steve Blockb0e0f332012-06-13 22:01:11 +0100548 * Sets whether the WebView whether supports multiple windows. If set to
549 * true, {@link WebChromeClient#onCreateWindow} must be implemented by the
550 * host application. The default is false.
551 *
552 * @param support whether to suport multiple windows
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700553 */
554 public synchronized void setSupportMultipleWindows(boolean support) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000555 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700556 }
557
558 /**
Steve Blockb0e0f332012-06-13 22:01:11 +0100559 * Gets whether the WebView supports multiple windows.
Steve Block4e584df2012-04-24 23:12:47 +0100560 *
Steve Blockb0e0f332012-06-13 22:01:11 +0100561 * @return true if the WebView supports multiple windows
562 * @see #setSupportMultipleWindows
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700563 */
564 public synchronized boolean supportMultipleWindows() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000565 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700566 }
567
568 /**
Steve Block4e584df2012-04-24 23:12:47 +0100569 * Sets the underlying layout algorithm. This will cause a relayout of the
Steve Blockb0e0f332012-06-13 22:01:11 +0100570 * WebView. The default is {@link LayoutAlgorithm#NARROW_COLUMNS}.
Steve Block4e584df2012-04-24 23:12:47 +0100571 *
Steve Blockb0e0f332012-06-13 22:01:11 +0100572 * @param l the layout algorithm to use, as a {@link LayoutAlgorithm} value
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700573 */
574 public synchronized void setLayoutAlgorithm(LayoutAlgorithm l) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000575 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700576 }
577
578 /**
Steve Block4e584df2012-04-24 23:12:47 +0100579 * Gets the current layout algorithm.
580 *
Steve Blockb0e0f332012-06-13 22:01:11 +0100581 * @return the layout algorithm in use, as a {@link LayoutAlgorithm} value
Steve Block4e584df2012-04-24 23:12:47 +0100582 * @see #setLayoutAlgorithm
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700583 */
584 public synchronized LayoutAlgorithm getLayoutAlgorithm() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000585 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700586 }
587
588 /**
Steve Block4e584df2012-04-24 23:12:47 +0100589 * Sets the standard font family name. The default is "sans-serif".
590 *
591 * @param font a font family name
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700592 */
593 public synchronized void setStandardFontFamily(String font) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000594 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700595 }
596
597 /**
Steve Block4e584df2012-04-24 23:12:47 +0100598 * Gets the standard font family name.
599 *
600 * @return the standard font family name as a string
601 * @see #setStandardFontFamily
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700602 */
603 public synchronized String getStandardFontFamily() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000604 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700605 }
606
607 /**
Steve Block4e584df2012-04-24 23:12:47 +0100608 * Sets the fixed font family name. The default is "monospace".
609 *
610 * @param font a font family name
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700611 */
612 public synchronized void setFixedFontFamily(String font) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000613 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700614 }
615
616 /**
Steve Block4e584df2012-04-24 23:12:47 +0100617 * Gets the fixed font family name.
618 *
619 * @return the fixed font family name as a string
620 * @see #setFixedFontFamily
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700621 */
622 public synchronized String getFixedFontFamily() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000623 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700624 }
625
626 /**
Steve Blockb0e0f332012-06-13 22:01:11 +0100627 * Sets the sans-serif font family name. The default is "sans-serif".
Steve Block4e584df2012-04-24 23:12:47 +0100628 *
629 * @param font a font family name
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700630 */
631 public synchronized void setSansSerifFontFamily(String font) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000632 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700633 }
634
635 /**
Steve Block4e584df2012-04-24 23:12:47 +0100636 * Gets the sans-serif font family name.
637 *
638 * @return the sans-serif font family name as a string
Steve Blockb0e0f332012-06-13 22:01:11 +0100639 * @see #setSansSerifFontFamily
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700640 */
641 public synchronized String getSansSerifFontFamily() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000642 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700643 }
644
645 /**
Steve Block4e584df2012-04-24 23:12:47 +0100646 * Sets the serif font family name. The default is "sans-serif".
647 *
648 * @param font a font family name
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700649 */
650 public synchronized void setSerifFontFamily(String font) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000651 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700652 }
653
654 /**
Steve Block4e584df2012-04-24 23:12:47 +0100655 * Gets the serif font family name. The default is "serif".
656 *
657 * @return the serif font family name as a string
658 * @see #setSerifFontFamily
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700659 */
660 public synchronized String getSerifFontFamily() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000661 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700662 }
663
664 /**
Steve Block4e584df2012-04-24 23:12:47 +0100665 * Sets the cursive font family name. The default is "cursive".
666 *
667 * @param font a font family name
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700668 */
669 public synchronized void setCursiveFontFamily(String font) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000670 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700671 }
672
673 /**
Steve Block4e584df2012-04-24 23:12:47 +0100674 * Gets the cursive font family name.
675 *
676 * @return the cursive font family name as a string
677 * @see #setCursiveFontFamily
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700678 */
679 public synchronized String getCursiveFontFamily() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000680 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700681 }
682
683 /**
Steve Block4e584df2012-04-24 23:12:47 +0100684 * Sets the fantasy font family name. The default is "fantasy".
685 *
686 * @param font a font family name
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700687 */
688 public synchronized void setFantasyFontFamily(String font) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000689 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700690 }
691
692 /**
Steve Block4e584df2012-04-24 23:12:47 +0100693 * Gets the fantasy font family name.
694 *
695 * @return the fantasy font family name as a string
696 * @see #setFantasyFontFamily
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700697 */
698 public synchronized String getFantasyFontFamily() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000699 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700700 }
701
702 /**
Steve Block4e584df2012-04-24 23:12:47 +0100703 * Sets the minimum font size. The default is 8.
704 *
705 * @param size a non-negative integer between 1 and 72. Any number outside
706 * the specified range will be pinned.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700707 */
708 public synchronized void setMinimumFontSize(int size) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000709 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700710 }
711
712 /**
Steve Block4e584df2012-04-24 23:12:47 +0100713 * Gets the minimum font size.
714 *
715 * @return a non-negative integer between 1 and 72
716 * @see #setMinimumFontSize
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700717 */
718 public synchronized int getMinimumFontSize() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000719 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700720 }
721
722 /**
Steve Block4e584df2012-04-24 23:12:47 +0100723 * Sets the minimum logical font size. The default is 8.
724 *
725 * @param size a non-negative integer between 1 and 72. Any number outside
726 * the specified range will be pinned.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700727 */
728 public synchronized void setMinimumLogicalFontSize(int size) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000729 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700730 }
731
732 /**
Steve Block4e584df2012-04-24 23:12:47 +0100733 * Gets the minimum logical font size.
734 *
735 * @return a non-negative integer between 1 and 72
736 * @see #setMinimumLogicalFontSize
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700737 */
738 public synchronized int getMinimumLogicalFontSize() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000739 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700740 }
741
742 /**
Steve Block4e584df2012-04-24 23:12:47 +0100743 * Sets the default font size. The default is 16.
744 *
745 * @param size a non-negative integer between 1 and 72. Any number outside
746 * the specified range will be pinned.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700747 */
748 public synchronized void setDefaultFontSize(int size) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000749 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700750 }
751
752 /**
Steve Block4e584df2012-04-24 23:12:47 +0100753 * Gets the default font size.
754 *
755 * @return a non-negative integer between 1 and 72
756 * @see #setDefaultFontSize
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700757 */
758 public synchronized int getDefaultFontSize() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000759 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700760 }
761
762 /**
Steve Block4e584df2012-04-24 23:12:47 +0100763 * Sets the default fixed font size. The default is 16.
764 *
765 * @param size a non-negative integer between 1 and 72. Any number outside
766 * the specified range will be pinned.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700767 */
768 public synchronized void setDefaultFixedFontSize(int size) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000769 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700770 }
771
772 /**
Steve Block4e584df2012-04-24 23:12:47 +0100773 * Gets the default fixed font size.
774 *
775 * @return a non-negative integer between 1 and 72
776 * @see #setDefaultFixedFontSize
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700777 */
778 public synchronized int getDefaultFixedFontSize() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000779 throw new MustOverrideException();
Grace Kloba097b1e772009-11-24 14:23:18 -0800780 }
781
782 /**
Mikhail Naganov605a4912012-02-03 16:53:10 +0000783 * Sets whether the WebView should load image resources. Note that this method
784 * controls loading of all images, including those embedded using the data
785 * URI scheme. Use {@link #setBlockNetworkImage} to control loading only
786 * of images specified using network URI schemes. Note that if the value of this
787 * setting is changed from false to true, all images resources referenced
788 * by content currently displayed by the WebView are loaded automatically.
Steve Block4e584df2012-04-24 23:12:47 +0100789 * The default is true.
790 *
791 * @param flag whether the WebView should load image resources
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700792 */
793 public synchronized void setLoadsImagesAutomatically(boolean flag) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000794 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700795 }
796
797 /**
Steve Block4e584df2012-04-24 23:12:47 +0100798 * Gets whether the WebView loads image resources. This includes
799 * images embedded using the data URI scheme.
800 *
801 * @return true if the WebView loads image resources
802 * @see #setLoadsImagesAutomatically
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700803 */
804 public synchronized boolean getLoadsImagesAutomatically() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000805 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700806 }
807
808 /**
Mikhail Naganov605a4912012-02-03 16:53:10 +0000809 * Sets whether the WebView should not load image resources from the
810 * network (resources accessed via http and https URI schemes). Note
811 * that this method has no effect unless
812 * {@link #getLoadsImagesAutomatically} returns true. Also note that
813 * disabling all network loads using {@link #setBlockNetworkLoads}
814 * will also prevent network images from loading, even if this flag is set
815 * to false. When the value of this setting is changed from true to false,
816 * network images resources referenced by content currently displayed by
Steve Block4e584df2012-04-24 23:12:47 +0100817 * the WebView are fetched automatically. The default is false.
818 *
819 * @param flag whether the WebView should not load image resources from the
820 * network
Patrick Scottf43113f2010-02-18 09:13:12 -0500821 * @see #setBlockNetworkLoads
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700822 */
823 public synchronized void setBlockNetworkImage(boolean flag) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000824 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700825 }
826
827 /**
Steve Block4e584df2012-04-24 23:12:47 +0100828 * Gets whether the WebView does not load image resources from the network.
829 *
830 * @return true if the WebView does not load image resources from the network
831 * @see #setBlockNetworkImage
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700832 */
833 public synchronized boolean getBlockNetworkImage() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000834 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700835 }
Mike Hearnadcd2ed2009-01-21 16:44:36 +0100836
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -0800837 /**
Mikhail Naganov605a4912012-02-03 16:53:10 +0000838 * Sets whether the WebView should not load resources from the network.
839 * Use {@link #setBlockNetworkImage} to only avoid loading
840 * image resources. Note that if the value of this setting is
841 * changed from true to false, network resources referenced by content
842 * currently displayed by the WebView are not fetched until
843 * {@link android.webkit.WebView#reload} is called.
844 * If the application does not have the
845 * {@link android.Manifest.permission#INTERNET} permission, attempts to set
846 * a value of false will cause a {@link java.lang.SecurityException}
Steve Block4e584df2012-04-24 23:12:47 +0100847 * to be thrown. The default value is false if the application has the
848 * {@link android.Manifest.permission#INTERNET} permission, otherwise it is
849 * true.
850 *
851 * @param flag whether the WebView should not load any resources from the
852 * network
Patrick Scottf43113f2010-02-18 09:13:12 -0500853 * @see android.webkit.WebView#reload
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -0800854 */
855 public synchronized void setBlockNetworkLoads(boolean flag) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000856 throw new MustOverrideException();
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -0800857 }
858
859 /**
Steve Block4e584df2012-04-24 23:12:47 +0100860 * Gets whether the WebView does not load any resources from the network.
861 *
862 * @return true if the WebView does not load any resources from the network
863 * @see #setBlockNetworkLoads
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -0800864 */
865 public synchronized boolean getBlockNetworkLoads() {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000866 throw new MustOverrideException();
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -0800867 }
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700868
869 /**
Steve Block4e584df2012-04-24 23:12:47 +0100870 * Tells the WebView to enable JavaScript execution.
871 * <b>The default is false.</b>
872 *
873 * @param flag true if the WebView should execute JavaScript
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700874 */
875 public synchronized void setJavaScriptEnabled(boolean flag) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000876 throw new MustOverrideException();
Teng-Hui Zhuda7378e2011-02-16 11:25:03 -0800877 }
878
879 /**
Steve Blockef163152012-04-23 18:08:06 +0100880 * Sets whether JavaScript running in the context of a file scheme URL
881 * should be allowed to access content from any origin. This includes
882 * access to content from other file scheme URLs. See
883 * {@link #setAllowFileAccessFromFileURLs}. To enable the most restrictive,
884 * and therefore secure policy, this setting should be disabled.
885 * <p>
886 * The default value is true for API level
887 * {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1} and below,
888 * and false for API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN}
889 * and above.
Selim Gurun0ea6dad2012-03-29 18:19:01 -0700890 *
Steve Blockef163152012-04-23 18:08:06 +0100891 * @param flag whether JavaScript running in the context of a file scheme
892 * URL should be allowed to access content from any origin
Selim Gurun0ea6dad2012-03-29 18:19:01 -0700893 */
894 public abstract void setAllowUniversalAccessFromFileURLs(boolean flag);
895
896 /**
Steve Blockef163152012-04-23 18:08:06 +0100897 * Sets whether JavaScript running in the context of a file scheme URL
898 * should be allowed to access content from other file scheme URLs. To
899 * enable the most restrictive, and therefore secure policy, this setting
900 * should be disabled. Note that the value of this setting is ignored if
901 * the value of {@link #getAllowUniversalAccessFromFileURLs} is true.
902 * <p>
903 * The default value is true for API level
904 * {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1} and below,
905 * and false for API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN}
906 * and above.
Selim Gurun0ea6dad2012-03-29 18:19:01 -0700907 *
Steve Blockef163152012-04-23 18:08:06 +0100908 * @param flag whether JavaScript running in the context of a file scheme
909 * URL should be allowed to access content from other file
910 * scheme URLs
Selim Gurun0ea6dad2012-03-29 18:19:01 -0700911 */
912 public abstract void setAllowFileAccessFromFileURLs(boolean flag);
913
914 /**
Steve Blockb0e0f332012-06-13 22:01:11 +0100915 * Sets whether the WebView should enable plugins. The default is false.
Steve Block4e584df2012-04-24 23:12:47 +0100916 *
Steve Blockb0e0f332012-06-13 22:01:11 +0100917 * @param flag true if plugins should be enabled
Patrick Scott300f2e92010-03-22 10:20:45 -0400918 * @deprecated This method has been deprecated in favor of
919 * {@link #setPluginState}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700920 */
Michael Kolba172e7d2010-06-30 12:35:26 -0700921 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700922 public synchronized void setPluginsEnabled(boolean flag) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000923 throw new MustOverrideException();
Patrick Scott300f2e92010-03-22 10:20:45 -0400924 }
925
926 /**
Steve Block4e584df2012-04-24 23:12:47 +0100927 * Tells the WebView to enable, disable, or have plugins on demand. On
Patrick Scott300f2e92010-03-22 10:20:45 -0400928 * demand mode means that if a plugin exists that can handle the embedded
929 * content, a placeholder icon will be shown instead of the plugin. When
Steve Blockb0e0f332012-06-13 22:01:11 +0100930 * the placeholder is clicked, the plugin will be enabled. The default is
931 * {@link PluginState#OFF}.
Steve Block4e584df2012-04-24 23:12:47 +0100932 *
933 * @param state a PluginState value
Patrick Scott300f2e92010-03-22 10:20:45 -0400934 */
935 public synchronized void setPluginState(PluginState state) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000936 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700937 }
938
939 /**
Steve Block4e584df2012-04-24 23:12:47 +0100940 * Sets a custom path to plugins used by the WebView. This method is
Derek Sollenbergerfdbdeb32010-08-12 11:20:13 -0400941 * obsolete since each plugin is now loaded from its own package.
Steve Block4e584df2012-04-24 23:12:47 +0100942 *
943 * @param pluginsPath a String path to the directory containing plugins
Derek Sollenbergerfdbdeb32010-08-12 11:20:13 -0400944 * @deprecated This method is no longer used as plugins are loaded from
Steve Block4e584df2012-04-24 23:12:47 +0100945 * their own APK via the system's package manager.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700946 */
Jason Chen9dc2e752010-09-01 19:11:14 -0700947 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700948 public synchronized void setPluginsPath(String pluginsPath) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000949 // Specified to do nothing, so no need for derived classes to override.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700950 }
951
952 /**
Steve Block4e584df2012-04-24 23:12:47 +0100953 * Sets the path to where database storage API databases should be saved.
Steve Block72ca7a42012-06-13 22:00:30 +0100954 * In order for the database storage API to function correctly, this method
955 * must be called with a path to which the application can write. This
956 * method should only be called once: repeated calls are ignored.
Steve Block4e584df2012-04-24 23:12:47 +0100957 *
Steve Block72ca7a42012-06-13 22:00:30 +0100958 * @param databasePath a path to the directory where databases should be
959 * saved.
Ben Murdoch7df19852009-04-22 13:07:58 +0100960 */
Steve Block4e584df2012-04-24 23:12:47 +0100961 // This will update WebCore when the Sync runs in the C++ side.
Steve Block72ca7a42012-06-13 22:00:30 +0100962 // Note that the WebCore Database Tracker only allows the path to be set
963 // once.
Ben Murdoch7df19852009-04-22 13:07:58 +0100964 public synchronized void setDatabasePath(String databasePath) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000965 throw new MustOverrideException();
Ben Murdoch7df19852009-04-22 13:07:58 +0100966 }
967
968 /**
Steve Block72ca7a42012-06-13 22:00:30 +0100969 * Sets the path where the Geolocation databases should be saved. In order
970 * for Geolocation permissions and cached positions to be persisted, this
971 * method must be called with a path to which the application can write.
Steve Block4e584df2012-04-24 23:12:47 +0100972 *
Steve Block72ca7a42012-06-13 22:00:30 +0100973 * @param databasePath a path to the directory where databases should be
974 * saved.
Steve Block9d3273f2009-08-21 13:16:27 +0100975 */
Steve Block4e584df2012-04-24 23:12:47 +0100976 // This will update WebCore when the Sync runs in the C++ side.
Steve Block9d3273f2009-08-21 13:16:27 +0100977 public synchronized void setGeolocationDatabasePath(String databasePath) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000978 throw new MustOverrideException();
Steve Block9d3273f2009-08-21 13:16:27 +0100979 }
980
981 /**
Steve Block72ca7a42012-06-13 22:00:30 +0100982 * Sets whether the Application Caches API should be enabled. The default
983 * is false. Note that in order for the Application Caches API to be
984 * enabled, a valid database path must also be supplied to
985 * {@link #setAppCachePath}.
Steve Block4e584df2012-04-24 23:12:47 +0100986 *
987 * @param flag true if the WebView should enable Application Caches
Andrei Popescu60a9a7d2009-04-17 10:43:42 +0100988 */
989 public synchronized void setAppCacheEnabled(boolean flag) {
Jonathan Dixon3c909522012-02-28 18:45:06 +0000990 throw new MustOverrideException();
Andrei Popescu60a9a7d2009-04-17 10:43:42 +0100991 }
992
993 /**
Steve Block72ca7a42012-06-13 22:00:30 +0100994 * Sets the path to the Application Caches files. In order for the
995 * Application Caches API to be enabled, this method must be called with a
996 * path to which the application can write. This method should only be
997 * called once: repeated calls are ignored.
Steve Block4e584df2012-04-24 23:12:47 +0100998 *
999 * @param appCachePath a String path to the directory containing
Steve Block72ca7a42012-06-13 22:00:30 +01001000 * Application Caches files.
1001 * @see setAppCacheEnabled
Andrei Popescu60a9a7d2009-04-17 10:43:42 +01001002 */
Jonathan Dixon3c909522012-02-28 18:45:06 +00001003 public synchronized void setAppCachePath(String appCachePath) {
1004 throw new MustOverrideException();
Andrei Popescu60a9a7d2009-04-17 10:43:42 +01001005 }
1006
1007 /**
Selim Gurunb632adf2012-06-28 11:21:05 -07001008 * Sets the maximum size for the Application Cache content. The passed size
1009 * will be rounded to the nearest value that the database can support, so
1010 * this should be viewed as a guide, not a hard limit. Setting the
1011 * size to a value less than current database size does not cause the
1012 * database to be trimmed. The default size is {@link Long.MAX_VALUE}.
Steve Block4e584df2012-04-24 23:12:47 +01001013 *
1014 * @param appCacheMaxSize the maximum size in bytes
Andrei Popescu1c829202009-07-22 16:47:52 +01001015 */
1016 public synchronized void setAppCacheMaxSize(long appCacheMaxSize) {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001017 throw new MustOverrideException();
Andrei Popescu1c829202009-07-22 16:47:52 +01001018 }
1019
1020 /**
Steve Blockb0e0f332012-06-13 22:01:11 +01001021 * Sets whether the database storage API is enabled. The default value is
1022 * false. See also {@link #setDatabasePath} for how to correctly set up the
1023 * database storage API.
Steve Block4e584df2012-04-24 23:12:47 +01001024 *
1025 * @param flag true if the WebView should use the database storage API
Ben Murdoch7df19852009-04-22 13:07:58 +01001026 */
1027 public synchronized void setDatabaseEnabled(boolean flag) {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001028 throw new MustOverrideException();
Ben Murdoch7df19852009-04-22 13:07:58 +01001029 }
1030
1031 /**
Steve Blockb0e0f332012-06-13 22:01:11 +01001032 * Sets whether the DOM storage API is enabled. The default value is false.
Steve Block4e584df2012-04-24 23:12:47 +01001033 *
1034 * @param flag true if the WebView should use the DOM storage API
Ben Murdoch274680d2009-05-28 13:44:44 +01001035 */
1036 public synchronized void setDomStorageEnabled(boolean flag) {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001037 throw new MustOverrideException();
Ben Murdoch274680d2009-05-28 13:44:44 +01001038 }
1039
1040 /**
Steve Block4e584df2012-04-24 23:12:47 +01001041 * Gets whether the DOM Storage APIs are enabled.
1042 *
1043 * @return true if the DOM Storage APIs are enabled
Steve Blockb0e0f332012-06-13 22:01:11 +01001044 * @see #setDomStorageEnabled
Ben Murdoch274680d2009-05-28 13:44:44 +01001045 */
1046 public synchronized boolean getDomStorageEnabled() {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001047 throw new MustOverrideException();
Ben Murdoch274680d2009-05-28 13:44:44 +01001048 }
Ben Murdoch274680d2009-05-28 13:44:44 +01001049 /**
Steve Blockb0e0f332012-06-13 22:01:11 +01001050 * Gets the path to where database storage API databases are saved.
Steve Block4e584df2012-04-24 23:12:47 +01001051 *
1052 * @return the String path to the database storage API databases
Steve Blockb0e0f332012-06-13 22:01:11 +01001053 * @see #setDatabasePath
Ben Murdoch7df19852009-04-22 13:07:58 +01001054 */
1055 public synchronized String getDatabasePath() {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001056 throw new MustOverrideException();
Ben Murdoch7df19852009-04-22 13:07:58 +01001057 }
1058
1059 /**
Steve Block4e584df2012-04-24 23:12:47 +01001060 * Gets whether the database storage API is enabled.
1061 *
1062 * @return true if the database storage API is enabled
Steve Blockb0e0f332012-06-13 22:01:11 +01001063 * @see #setDatabaseEnabled
Ben Murdoch7df19852009-04-22 13:07:58 +01001064 */
1065 public synchronized boolean getDatabaseEnabled() {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001066 throw new MustOverrideException();
Andrei Popescuc27a9ac2009-08-03 15:59:24 +01001067 }
1068
1069 /**
Steve Blockb0e0f332012-06-13 22:01:11 +01001070 * Sets whether Geolocation is enabled. The default is true. See also
1071 * {@link #setGeolocationDatabasePath} for how to correctly set up
1072 * Geolocation.
Steve Block4e584df2012-04-24 23:12:47 +01001073 *
1074 * @param flag whether Geolocation should be enabled
Steve Block06cd7512009-08-21 10:26:37 +01001075 */
1076 public synchronized void setGeolocationEnabled(boolean flag) {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001077 throw new MustOverrideException();
Elliott Slaughter5dc0c822010-06-22 11:31:54 -07001078 }
1079
1080 /**
Steve Block4e584df2012-04-24 23:12:47 +01001081 * Gets whether JavaScript is enabled.
1082 *
1083 * @return true if JavaScript is enabled
1084 * @see #setJavaScriptEnabled
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001085 */
1086 public synchronized boolean getJavaScriptEnabled() {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001087 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001088 }
1089
1090 /**
Steve Blockef163152012-04-23 18:08:06 +01001091 * Gets whether JavaScript running in the context of a file scheme URL can
1092 * access content from any origin. This includes access to content from
1093 * other file scheme URLs.
Selim Gurun0ea6dad2012-03-29 18:19:01 -07001094 *
Steve Blockef163152012-04-23 18:08:06 +01001095 * @return whether JavaScript running in the context of a file scheme URL
1096 * can access content from any origin
Steve Block4e584df2012-04-24 23:12:47 +01001097 * @see #setAllowUniversalAccessFromFileURLs
Selim Gurun0ea6dad2012-03-29 18:19:01 -07001098 */
1099 public abstract boolean getAllowUniversalAccessFromFileURLs();
1100
1101 /**
Steve Blockef163152012-04-23 18:08:06 +01001102 * Gets whether JavaScript running in the context of a file scheme URL can
1103 * access content from other file scheme URLs.
Selim Gurun0ea6dad2012-03-29 18:19:01 -07001104 *
Steve Blockef163152012-04-23 18:08:06 +01001105 * @return whether JavaScript running in the context of a file scheme URL
1106 * can access content from other file scheme URLs
Steve Block4e584df2012-04-24 23:12:47 +01001107 * @see #setAllowFileAccessFromFileURLs
Selim Gurun0ea6dad2012-03-29 18:19:01 -07001108 */
1109 public abstract boolean getAllowFileAccessFromFileURLs();
1110
1111 /**
Steve Block4e584df2012-04-24 23:12:47 +01001112 * Gets whether plugins are enabled.
1113 *
1114 * @return true if plugins are enabled
Steve Blockb0e0f332012-06-13 22:01:11 +01001115 * @see #setPluginsEnabled
Patrick Scott300f2e92010-03-22 10:20:45 -04001116 * @deprecated This method has been replaced by {@link #getPluginState}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001117 */
Michael Kolba172e7d2010-06-30 12:35:26 -07001118 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001119 public synchronized boolean getPluginsEnabled() {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001120 throw new MustOverrideException();
Patrick Scott300f2e92010-03-22 10:20:45 -04001121 }
1122
1123 /**
Steve Blockb0e0f332012-06-13 22:01:11 +01001124 * Gets the current state regarding whether plugins are enabled.
Steve Block4e584df2012-04-24 23:12:47 +01001125 *
Steve Blockb0e0f332012-06-13 22:01:11 +01001126 * @return the plugin state as a {@link PluginState} value
1127 * @see #setPluginState
Patrick Scott300f2e92010-03-22 10:20:45 -04001128 */
1129 public synchronized PluginState getPluginState() {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001130 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001131 }
1132
1133 /**
Steve Block4e584df2012-04-24 23:12:47 +01001134 * Gets the directory that contains the plugin libraries. This method is
Derek Sollenbergerfdbdeb32010-08-12 11:20:13 -04001135 * obsolete since each plugin is now loaded from its own package.
Steve Block4e584df2012-04-24 23:12:47 +01001136 *
1137 * @return an empty string
Derek Sollenbergerfdbdeb32010-08-12 11:20:13 -04001138 * @deprecated This method is no longer used as plugins are loaded from
1139 * their own APK via the system's package manager.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001140 */
Jason Chen9dc2e752010-09-01 19:11:14 -07001141 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001142 public synchronized String getPluginsPath() {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001143 // Unconditionally returns empty string, so no need for derived classes to override.
Grace Kloba658ab7d2009-05-14 14:45:26 -07001144 return "";
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001145 }
1146
1147 /**
Steve Block4e584df2012-04-24 23:12:47 +01001148 * Tells JavaScript to open windows automatically. This applies to the
1149 * JavaScript function window.open(). The default is false.
1150 *
1151 * @param flag true if JavaScript can open windows automatically
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001152 */
Jonathan Dixon3c909522012-02-28 18:45:06 +00001153 public synchronized void setJavaScriptCanOpenWindowsAutomatically(boolean flag) {
1154 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001155 }
1156
1157 /**
Steve Block4e584df2012-04-24 23:12:47 +01001158 * Gets whether JavaScript can open windows automatically.
1159 *
1160 * @return true if JavaScript can open windows automatically during
1161 * window.open()
1162 * @see #setJavaScriptCanOpenWindowsAutomatically
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001163 */
1164 public synchronized boolean getJavaScriptCanOpenWindowsAutomatically() {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001165 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001166 }
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001167 /**
Steve Block4e584df2012-04-24 23:12:47 +01001168 * Sets the default text encoding name to use when decoding html pages.
1169 * The default is "Latin-1".
1170 *
1171 * @param encoding the text encoding name
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001172 */
1173 public synchronized void setDefaultTextEncodingName(String encoding) {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001174 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001175 }
1176
1177 /**
Steve Block4e584df2012-04-24 23:12:47 +01001178 * Gets the default text encoding name.
1179 *
1180 * @return the default text encoding name as a string
1181 * @see #setDefaultTextEncodingName
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001182 */
1183 public synchronized String getDefaultTextEncodingName() {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001184 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001185 }
1186
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08001187 /**
Steve Blockb0e0f332012-06-13 22:01:11 +01001188 * Sets the WebView's user-agent string. If the string is null or empty,
1189 * the system default value will be used.
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08001190 */
1191 public synchronized void setUserAgentString(String ua) {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001192 throw new MustOverrideException();
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08001193 }
1194
1195 /**
Steve Block4e584df2012-04-24 23:12:47 +01001196 * Gets the WebView's user-agent string.
Steve Blockb0e0f332012-06-13 22:01:11 +01001197 *
1198 * @return the WebView's user-agent string
1199 * @see #setUserAgentString
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08001200 */
1201 public synchronized String getUserAgentString() {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001202 throw new MustOverrideException();
Shimeng (Simon) Wangc55886a2010-10-28 13:46:02 -07001203 }
1204
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001205 /**
Steve Block4e584df2012-04-24 23:12:47 +01001206 * Tells the WebView whether it needs to set a node to have focus when
Steve Blockb0e0f332012-06-13 22:01:11 +01001207 * {@link WebView#requestFocus(int, android.graphics.Rect)} is called. The
1208 * default value is true.
Michael Kolba172e7d2010-06-30 12:35:26 -07001209 *
Steve Block4e584df2012-04-24 23:12:47 +01001210 * @param flag whether the WebView needs to set a node
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001211 */
1212 public void setNeedInitialFocus(boolean flag) {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001213 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001214 }
1215
1216 /**
Steve Block4e584df2012-04-24 23:12:47 +01001217 * Sets the priority of the Render thread. Unlike the other settings, this
Steve Blockb0e0f332012-06-13 22:01:11 +01001218 * one only needs to be called once per process. The default value is
1219 * {@link RenderPriority#NORMAL}.
Mike Hearnadcd2ed2009-01-21 16:44:36 +01001220 *
Steve Blockb0e0f332012-06-13 22:01:11 +01001221 * @param priority the priority
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001222 */
1223 public synchronized void setRenderPriority(RenderPriority priority) {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001224 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001225 }
Michael Kolba172e7d2010-06-30 12:35:26 -07001226
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001227 /**
Steve Block4e584df2012-04-24 23:12:47 +01001228 * Overrides the way the cache is used. The way the cache is used is based
Steve Blockb0e0f332012-06-13 22:01:11 +01001229 * on the navigation type. For a normal page load, the cache is checked
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001230 * and content is re-validated as needed. When navigating back, content is
Steve Blockb0e0f332012-06-13 22:01:11 +01001231 * not revalidated, instead the content is just retrieved from the cache.
1232 * This method allows the client to override this behavior by specifying
1233 * one of {@link #LOAD_DEFAULT}, {@link #LOAD_NORMAL},
1234 * {@link #LOAD_CACHE_ELSE_NETWORK}, {@link #LOAD_NO_CACHE} or
1235 * {@link #LOAD_CACHE_ONLY}. The default value is {@link #LOAD_DEFAULT}.
Steve Block4e584df2012-04-24 23:12:47 +01001236 *
Steve Blockb0e0f332012-06-13 22:01:11 +01001237 * @param mode the mode to use
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001238 */
1239 public void setCacheMode(int mode) {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001240 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001241 }
Michael Kolba172e7d2010-06-30 12:35:26 -07001242
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001243 /**
Steve Blockb0e0f332012-06-13 22:01:11 +01001244 * Gets the current setting for overriding the cache mode.
1245 *
1246 * @return the current setting for overriding the cache mode
1247 * @see #setCacheMode
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001248 */
1249 public int getCacheMode() {
Jonathan Dixon3c909522012-02-28 18:45:06 +00001250 throw new MustOverrideException();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001251 }
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001252}