WebSettings.java revision b0e0f334422e25542e48901c8451e51c8efab590
154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project/* 254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * Copyright (C) 2007 The Android Open Source Project 354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * 454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * Licensed under the Apache License, Version 2.0 (the "License"); 554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * you may not use this file except in compliance with the License. 654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * You may obtain a copy of the License at 754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * 854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * http://www.apache.org/licenses/LICENSE-2.0 954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * 1054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * Unless required by applicable law or agreed to in writing, software 1154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * distributed under the License is distributed on an "AS IS" BASIS, 1254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * See the License for the specific language governing permissions and 1454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * limitations under the License. 1554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 1654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 1754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Projectpackage android.webkit; 1854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 1954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Projectimport android.os.Message; 200ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurunimport android.os.Build; 2154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 2254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project/** 2354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * Manages settings state for a WebView. When a WebView is first created, it 2454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * obtains a set of default settings. These default settings will be returned 2554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * from any getter call. A WebSettings object obtained from 2654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * WebView.getSettings() is tied to the life of the WebView. If a WebView has 2754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * been destroyed, any method call on WebSettings will throw an 2854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * IllegalStateException. 2954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 30d3101b1d300f5942fdb7dfa323dc8830c4edc007Jonathan Dixon// This is an abstract base class: concrete WebViewProviders must 313c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon// create a class derived from this, and return an instance of it in the 323c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon// WebViewProvider.getWebSettingsProvider() method implementation. 330ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurunpublic abstract class WebSettings { 3454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 3554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * Enum for controlling the layout of html. 364e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * <ul> 374e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * <li>NORMAL means no rendering changes.</li> 384e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * <li>SINGLE_COLUMN moves all content into one column that is the width of the 394e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * view.</li> 404e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * <li>NARROW_COLUMNS makes all columns no wider than the screen if possible.</li> 414e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * </ul> 4254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 4354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project // XXX: These must match LayoutAlgorithm in Settings.h in WebCore. 4454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public enum LayoutAlgorithm { 4554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project NORMAL, 465a1ef4132f93f57940a5cc49d32991674d014841John Reck /** 475a1ef4132f93f57940a5cc49d32991674d014841John Reck * @deprecated This algorithm is now obsolete. 485a1ef4132f93f57940a5cc49d32991674d014841John Reck */ 495a1ef4132f93f57940a5cc49d32991674d014841John Reck @Deprecated 5054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project SINGLE_COLUMN, 5154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project NARROW_COLUMNS 5254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 5354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 5454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 5554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * Enum for specifying the text size. 564e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * <ul> 574e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * <li>SMALLEST is 50%</li> 584e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * <li>SMALLER is 75%</li> 594e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * <li>NORMAL is 100%</li> 604e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * <li>LARGER is 150%</li> 614e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * <li>LARGEST is 200%</li> 624e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * </ul> 634e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 64caeb120170477f52516cd9d12469c582e7dec8feJohn Reck * @deprecated Use {@link WebSettings#setTextZoom(int)} and {@link WebSettings#getTextZoom()} instead. 6554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 6654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public enum TextSize { 6754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project SMALLEST(50), 6854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project SMALLER(75), 6954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project NORMAL(100), 7054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project LARGER(150), 7154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project LARGEST(200); 7254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project TextSize(int size) { 7354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project value = size; 7454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 7554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project int value; 7654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 770d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba 780d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba /** 790d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba * Enum for specifying the WebView's desired density. 804e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * <ul> 814e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * <li>FAR makes 100% looking like in 240dpi</li> 824e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * <li>MEDIUM makes 100% looking like in 160dpi</li> 834e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * <li>CLOSE makes 100% looking like in 120dpi</li> 844e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * </ul> 850d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba */ 860d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba public enum ZoomDensity { 870d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba FAR(150), // 240dpi 880d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba MEDIUM(100), // 160dpi 890d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba CLOSE(75); // 120dpi 900d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba ZoomDensity(int size) { 910d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba value = size; 920d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba } 930d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba int value; 940d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba } 950d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba 9654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 974e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Default cache usage pattern. Use with {@link #setCacheMode}. 9854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 9954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public static final int LOAD_DEFAULT = -1; 10054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 10154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 1024e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Normal cache usage pattern. Use with {@link #setCacheMode}. 10354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 10454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public static final int LOAD_NORMAL = 0; 10554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 10654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 1074e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Use cache if content is there, even if expired (eg, history nav). 10854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * If it is not in the cache, load from network. 10954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * Use with {@link #setCacheMode}. 11054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 11154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public static final int LOAD_CACHE_ELSE_NETWORK = 1; 11254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 11354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 1144e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Don't use the cache, load from network. 11554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * Use with {@link #setCacheMode}. 11654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 11754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public static final int LOAD_NO_CACHE = 2; 118a172e7d0d96e4a4db5e2b408e8ee3e96948df9a4Michael Kolb 11954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 12054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * Don't use the network, load from cache only. 12154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * Use with {@link #setCacheMode}. 12254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 12354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public static final int LOAD_CACHE_ONLY = 3; 12454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 12554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public enum RenderPriority { 12654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project NORMAL, 12754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project HIGH, 12854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project LOW 12954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 13054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 131300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott /** 132300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott * The plugin state effects how plugins are treated on a page. ON means 133300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott * that any object will be loaded even if a plugin does not exist to handle 134300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott * the content. ON_DEMAND means that if there is a plugin installed that 135300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott * can handle the content, a placeholder is shown until the user clicks on 136300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott * the placeholder. Once clicked, the plugin will be enabled on the page. 137300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott * OFF means that all plugins will be turned off and any fallback content 138300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott * will be used. 139300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott */ 140300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott public enum PluginState { 141300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott ON, 142300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott ON_DEMAND, 143300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott OFF 144300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott } 145300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott 1460e4cb9d89fe58b378d94c87f182aaaef9d6a6d60Shimeng (Simon) Wang /** 1473c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon * Hidden constructor to prevent clients from creating a new settings 1483c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon * instance or deriving the class. 1494e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 1503c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon * @hide 1510e4cb9d89fe58b378d94c87f182aaaef9d6a6d60Shimeng (Simon) Wang */ 1523c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon protected WebSettings() { 15354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 154a172e7d0d96e4a4db5e2b408e8ee3e96948df9a4Michael Kolb 15554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 156b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Enables dumping the pages navigation cache to a text file. The default 157b0e0f334422e25542e48901c8451e51c8efab590Steve Block * is false. 1584e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 159fc77165d446520716f18cdc14e30b39a6d8b9bacKristian Monsen * @deprecated This method is now obsolete. 16054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 161fc77165d446520716f18cdc14e30b39a6d8b9bacKristian Monsen @Deprecated 16254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public void setNavDump(boolean enabled) { 1633c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 16454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 16554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 16654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 1674e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets whether dumping the navigation cache is enabled. 1684e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 169b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @return whether dumping the navigation cache is enabled 170b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @see #setNavDump 171fc77165d446520716f18cdc14e30b39a6d8b9bacKristian Monsen * @deprecated This method is now obsolete. 17254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 173fc77165d446520716f18cdc14e30b39a6d8b9bacKristian Monsen @Deprecated 17454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public boolean getNavDump() { 1753c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 17654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 17754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 17854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 179b533fb4eef92b62cc26c4d9a901689e8f079fb73Mikhail Naganov * Sets whether the WebView should support zooming using its on-screen zoom 180b533fb4eef92b62cc26c4d9a901689e8f079fb73Mikhail Naganov * controls and gestures. The particular zoom mechanisms that should be used 181b533fb4eef92b62cc26c4d9a901689e8f079fb73Mikhail Naganov * can be set with {@link #setBuiltInZoomControls}. This setting does not 182b533fb4eef92b62cc26c4d9a901689e8f079fb73Mikhail Naganov * affect zooming performed using the {@link WebView#zoomIn()} and 1834e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * {@link WebView#zoomOut()} methods. The default is true. 1844e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 1854e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param support whether the WebView should support zoom 18654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 18754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public void setSupportZoom(boolean support) { 1883c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 18954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 19054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 19154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 1924e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets whether the WebView supports zoom. 1934e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 1944e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return true if the WebView supports zoom 1954e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setSupportZoom 19654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 19754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public boolean supportZoom() { 1983c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 19954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 20054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 20154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 20206d268e3ad1129814829af5d3b84752d84c1acf2Steve Block * Sets whether the WebView should use its built-in zoom mechanisms. The 20306d268e3ad1129814829af5d3b84752d84c1acf2Steve Block * built-in zoom mechanisms comprise on-screen zoom controls, which are 20406d268e3ad1129814829af5d3b84752d84c1acf2Steve Block * displayed over the WebView's content, and the use of a pinch gesture to 20506d268e3ad1129814829af5d3b84752d84c1acf2Steve Block * control zooming. Whether or not these on-screen controls are displayed 2064e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * can be set with {@link #setDisplayZoomControls}. The default is false. 20706d268e3ad1129814829af5d3b84752d84c1acf2Steve Block * <p> 20806d268e3ad1129814829af5d3b84752d84c1acf2Steve Block * The built-in mechanisms are the only currently supported zoom 20906d268e3ad1129814829af5d3b84752d84c1acf2Steve Block * mechanisms, so it is recommended that this setting is always enabled. 2104e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 2114e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param enabled whether the WebView should use its built-in zoom mechanisms 21206d268e3ad1129814829af5d3b84752d84c1acf2Steve Block */ 21306d268e3ad1129814829af5d3b84752d84c1acf2Steve Block // This method was intended to select between the built-in zoom mechanisms 21406d268e3ad1129814829af5d3b84752d84c1acf2Steve Block // and the separate zoom controls. The latter were obtained using 21506d268e3ad1129814829af5d3b84752d84c1acf2Steve Block // {@link WebView#getZoomControls}, which is now hidden. 216105925376f8d0f6b318c9938c7b83ef7fef094daThe Android Open Source Project public void setBuiltInZoomControls(boolean enabled) { 2173c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 218105925376f8d0f6b318c9938c7b83ef7fef094daThe Android Open Source Project } 219a172e7d0d96e4a4db5e2b408e8ee3e96948df9a4Michael Kolb 220105925376f8d0f6b318c9938c7b83ef7fef094daThe Android Open Source Project /** 2214e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets whether the zoom mechanisms built into WebView are being used. 2224e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 2234e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return true if the zoom mechanisms built into WebView are being used 2244e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setBuiltInZoomControls 225105925376f8d0f6b318c9938c7b83ef7fef094daThe Android Open Source Project */ 226105925376f8d0f6b318c9938c7b83ef7fef094daThe Android Open Source Project public boolean getBuiltInZoomControls() { 2273c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 228105925376f8d0f6b318c9938c7b83ef7fef094daThe Android Open Source Project } 229a172e7d0d96e4a4db5e2b408e8ee3e96948df9a4Michael Kolb 230105925376f8d0f6b318c9938c7b83ef7fef094daThe Android Open Source Project /** 231b533fb4eef92b62cc26c4d9a901689e8f079fb73Mikhail Naganov * Sets whether the WebView should display on-screen zoom controls when 232b533fb4eef92b62cc26c4d9a901689e8f079fb73Mikhail Naganov * using the built-in zoom mechanisms. See {@link #setBuiltInZoomControls}. 2334e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * The default is true. 2344e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 2354e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param enabled whether the WebView should display on-screen zoom controls 2366fe3b421fdc5b109cbf9006f44c9f089224a817dMichael Kolb */ 2376fe3b421fdc5b109cbf9006f44c9f089224a817dMichael Kolb public void setDisplayZoomControls(boolean enabled) { 2383c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 2396fe3b421fdc5b109cbf9006f44c9f089224a817dMichael Kolb } 2406fe3b421fdc5b109cbf9006f44c9f089224a817dMichael Kolb 2416fe3b421fdc5b109cbf9006f44c9f089224a817dMichael Kolb /** 2424e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets whether the WebView displays on-screen zoom controls when using 243b533fb4eef92b62cc26c4d9a901689e8f079fb73Mikhail Naganov * the built-in zoom mechanisms. 2444e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 2454e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return true if the WebView displays on-screen zoom controls when using 2464e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * the built-in zoom mechanisms 2474e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setDisplayZoomControls 2486fe3b421fdc5b109cbf9006f44c9f089224a817dMichael Kolb */ 2496fe3b421fdc5b109cbf9006f44c9f089224a817dMichael Kolb public boolean getDisplayZoomControls() { 2503c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 2516fe3b421fdc5b109cbf9006f44c9f089224a817dMichael Kolb } 2526fe3b421fdc5b109cbf9006f44c9f089224a817dMichael Kolb 2536fe3b421fdc5b109cbf9006f44c9f089224a817dMichael Kolb /** 2544e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Enables or disables file access within WebView. File access is enabled by 255d1737edc13864b2304763167720b27b68791e25aPatrick Scott * default. Note that this enables or disables file system access only. 256d1737edc13864b2304763167720b27b68791e25aPatrick Scott * Assets and resources are still accessible using file:///android_asset and 257d1737edc13864b2304763167720b27b68791e25aPatrick Scott * file:///android_res. 258f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project */ 259f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project public void setAllowFileAccess(boolean allow) { 2603c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 261f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project } 262f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project 263f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project /** 2644e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets whether this WebView supports file access. 2654e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 2664e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setAllowFileAccess 267f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project */ 268f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project public boolean getAllowFileAccess() { 2693c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 270f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project } 271f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project 272f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project /** 2734e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Enables or disables content URL access within WebView. Content URL 2744e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * access allows WebView to load content from a content provider installed 2754e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * in the system. The default is enabled. 276d1737edc13864b2304763167720b27b68791e25aPatrick Scott */ 277d1737edc13864b2304763167720b27b68791e25aPatrick Scott public void setAllowContentAccess(boolean allow) { 2783c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 279d1737edc13864b2304763167720b27b68791e25aPatrick Scott } 280d1737edc13864b2304763167720b27b68791e25aPatrick Scott 281d1737edc13864b2304763167720b27b68791e25aPatrick Scott /** 2824e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets whether this WebView supports content URL access. 2834e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 2844e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setAllowContentAccess 285d1737edc13864b2304763167720b27b68791e25aPatrick Scott */ 286d1737edc13864b2304763167720b27b68791e25aPatrick Scott public boolean getAllowContentAccess() { 2873c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 288d1737edc13864b2304763167720b27b68791e25aPatrick Scott } 289d1737edc13864b2304763167720b27b68791e25aPatrick Scott 290d1737edc13864b2304763167720b27b68791e25aPatrick Scott /** 291b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Sets whether the WebView loads pages in overview mode. The default is 292b0e0f334422e25542e48901c8451e51c8efab590Steve Block * false. 293e397a88e4fd65ee7d346f63a43e6608dba943ee9Grace Kloba */ 294e397a88e4fd65ee7d346f63a43e6608dba943ee9Grace Kloba public void setLoadWithOverviewMode(boolean overview) { 2953c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 296e397a88e4fd65ee7d346f63a43e6608dba943ee9Grace Kloba } 297e397a88e4fd65ee7d346f63a43e6608dba943ee9Grace Kloba 298e397a88e4fd65ee7d346f63a43e6608dba943ee9Grace Kloba /** 299b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Gets whether this WebView loads pages in overview mode. 300b0e0f334422e25542e48901c8451e51c8efab590Steve Block * 301b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @return whether this WebView loads pages in overview mode 302b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @see #setLoadWithOverviewMode 303e397a88e4fd65ee7d346f63a43e6608dba943ee9Grace Kloba */ 304e397a88e4fd65ee7d346f63a43e6608dba943ee9Grace Kloba public boolean getLoadWithOverviewMode() { 3053c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 306e397a88e4fd65ee7d346f63a43e6608dba943ee9Grace Kloba } 307e397a88e4fd65ee7d346f63a43e6608dba943ee9Grace Kloba 308e397a88e4fd65ee7d346f63a43e6608dba943ee9Grace Kloba /** 3094e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Sets whether the WebView will enable smooth transition while panning or 310e00e8a78374cdcf01a25bd6327d2b94944b2bc3fAdam Powell * zooming or while the window hosting the WebView does not have focus. 311e00e8a78374cdcf01a25bd6327d2b94944b2bc3fAdam Powell * If it is true, WebView will choose a solution to maximize the performance. 312e00e8a78374cdcf01a25bd6327d2b94944b2bc3fAdam Powell * e.g. the WebView's content may not be updated during the transition. 313e00e8a78374cdcf01a25bd6327d2b94944b2bc3fAdam Powell * If it is false, WebView will keep its fidelity. The default value is false. 314f9b731d383790e0dfd407525efcd72bba4ee4895Grace Kloba */ 315f9b731d383790e0dfd407525efcd72bba4ee4895Grace Kloba public void setEnableSmoothTransition(boolean enable) { 3163c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 317f9b731d383790e0dfd407525efcd72bba4ee4895Grace Kloba } 3184e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block 319f9b731d383790e0dfd407525efcd72bba4ee4895Grace Kloba /** 3204e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets whether the WebView enables smooth transition while panning or 321f9b731d383790e0dfd407525efcd72bba4ee4895Grace Kloba * zooming. 3224e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 3234e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setEnableSmoothTransition 324f9b731d383790e0dfd407525efcd72bba4ee4895Grace Kloba */ 325f9b731d383790e0dfd407525efcd72bba4ee4895Grace Kloba public boolean enableSmoothTransition() { 3263c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 327f9b731d383790e0dfd407525efcd72bba4ee4895Grace Kloba } 328f9b731d383790e0dfd407525efcd72bba4ee4895Grace Kloba 329f9b731d383790e0dfd407525efcd72bba4ee4895Grace Kloba /** 3304e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Sets whether the WebView uses its background for over scroll background. 331637d337b58d8eec6de19230a5dd5ca5581c0478dAdam Powell * If true, it will use the WebView's background. If false, it will use an 332637d337b58d8eec6de19230a5dd5ca5581c0478dAdam Powell * internal pattern. Default is true. 3334e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 334fc77165d446520716f18cdc14e30b39a6d8b9bacKristian Monsen * @deprecated This method is now obsolete. 335637d337b58d8eec6de19230a5dd5ca5581c0478dAdam Powell */ 336fc77165d446520716f18cdc14e30b39a6d8b9bacKristian Monsen @Deprecated 337637d337b58d8eec6de19230a5dd5ca5581c0478dAdam Powell public void setUseWebViewBackgroundForOverscrollBackground(boolean view) { 3383c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 339637d337b58d8eec6de19230a5dd5ca5581c0478dAdam Powell } 340637d337b58d8eec6de19230a5dd5ca5581c0478dAdam Powell 341637d337b58d8eec6de19230a5dd5ca5581c0478dAdam Powell /** 3424e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets whether this WebView uses WebView's background instead of 343637d337b58d8eec6de19230a5dd5ca5581c0478dAdam Powell * internal pattern for over scroll background. 3444e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 3454e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setUseWebViewBackgroundForOverscrollBackground 346fc77165d446520716f18cdc14e30b39a6d8b9bacKristian Monsen * @deprecated This method is now obsolete. 347637d337b58d8eec6de19230a5dd5ca5581c0478dAdam Powell */ 348fc77165d446520716f18cdc14e30b39a6d8b9bacKristian Monsen @Deprecated 349637d337b58d8eec6de19230a5dd5ca5581c0478dAdam Powell public boolean getUseWebViewBackgroundForOverscrollBackground() { 3503c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 351637d337b58d8eec6de19230a5dd5ca5581c0478dAdam Powell } 352637d337b58d8eec6de19230a5dd5ca5581c0478dAdam Powell 353637d337b58d8eec6de19230a5dd5ca5581c0478dAdam Powell /** 354b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Sets whether the WebView should save form data. The default is true, 355b0e0f334422e25542e48901c8451e51c8efab590Steve Block * unless in private browsing mode, when the value is always false. 35654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 35754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public void setSaveFormData(boolean save) { 3583c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 35954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 36054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 36154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 362b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Gets whether the WebView saves form data. Always false in private 363b0e0f334422e25542e48901c8451e51c8efab590Steve Block * browsing mode. 364b0e0f334422e25542e48901c8451e51c8efab590Steve Block * 365b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @return whether the WebView saves form data 366b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @see #setSaveFormData 36754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 36854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public boolean getSaveFormData() { 3693c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 37054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 37154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 37254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 373b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Sets whether the WebView should save passwords. The default is true. 37454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 37554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public void setSavePassword(boolean save) { 3763c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 37754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 37854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 37954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 380b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Gets whether the WebView saves passwords. 381b0e0f334422e25542e48901c8451e51c8efab590Steve Block * 382b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @return whether the WebView saves passwords 383b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @see #setSavePassword 38454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 38554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public boolean getSavePassword() { 3863c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 38754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 38854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 38954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 390b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Sets the text zoom of the page in percent. The default is 100. 3914e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 392b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @param textZoom the text zoom in percent 393ff56bcde857c1ea15a9d4bc7fc10653c409b89bdJohn Reck */ 394ff56bcde857c1ea15a9d4bc7fc10653c409b89bdJohn Reck public synchronized void setTextZoom(int textZoom) { 3953c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 396ff56bcde857c1ea15a9d4bc7fc10653c409b89bdJohn Reck } 397ff56bcde857c1ea15a9d4bc7fc10653c409b89bdJohn Reck 398ff56bcde857c1ea15a9d4bc7fc10653c409b89bdJohn Reck /** 3994e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets the text zoom of the page in percent. 4004e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 401b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @return the text zoom of the page in percent 4024e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setTextSizeZoom 403ff56bcde857c1ea15a9d4bc7fc10653c409b89bdJohn Reck */ 404ff56bcde857c1ea15a9d4bc7fc10653c409b89bdJohn Reck public synchronized int getTextZoom() { 4053c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 406ff56bcde857c1ea15a9d4bc7fc10653c409b89bdJohn Reck } 407ff56bcde857c1ea15a9d4bc7fc10653c409b89bdJohn Reck 408ff56bcde857c1ea15a9d4bc7fc10653c409b89bdJohn Reck /** 409b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Sets the text size of the page. The default is {@link TextSize#NORMAL}. 4104e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 411b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @param t the text size as a {@link TextSize} value 412b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @deprecated Use {@link #setTextZoom} instead. 41354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 41454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setTextSize(TextSize t) { 4153c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 41654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 41754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 41854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 4194e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets the text size of the page. If the text size was previously specified 420b0e0f334422e25542e48901c8451e51c8efab590Steve Block * in percent using {@link #setTextZoom}, this will return the closest 421b0e0f334422e25542e48901c8451e51c8efab590Steve Block * matching {@link TextSize}. 4224e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 423b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @return the text size as a {@link TextSize} value 424b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @see #setTextSize 425b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @deprecated Use {@link #getTextZoom} instead. 42654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 42754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized TextSize getTextSize() { 4283c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 429edb528ef52fd9b0148d559c5e596cf9bb9a6d2f9Mangesh Ghiware } 430edb528ef52fd9b0148d559c5e596cf9bb9a6d2f9Mangesh Ghiware 431edb528ef52fd9b0148d559c5e596cf9bb9a6d2f9Mangesh Ghiware /** 432b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Sets the default zoom density of the page. This must be called from the UI 433b0e0f334422e25542e48901c8451e51c8efab590Steve Block * thread. The default is {@link ZoomDensity#MEDIUM}. 4344e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 435b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @param zoom the zoom density 4360d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba */ 4370d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba public void setDefaultZoom(ZoomDensity zoom) { 4383c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 4390d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba } 4400d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba 4410d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba /** 442b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Gets the default zoom density of the page. This should be called from 443b0e0f334422e25542e48901c8451e51c8efab590Steve Block * the UI thread. 444b0e0f334422e25542e48901c8451e51c8efab590Steve Block * 445b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @return the zoom density 446b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @see #setDefaultZoom 4470d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba */ 4480d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba public ZoomDensity getDefaultZoom() { 4493c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 4500d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba } 4510d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba 4520d8b77c2453d0e597f94e39212e4bfeed8affffaGrace Kloba /** 45354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * Enables using light touches to make a selection and activate mouseovers. 454b0e0f334422e25542e48901c8451e51c8efab590Steve Block * The default is false. 45554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 45654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public void setLightTouchEnabled(boolean enabled) { 4573c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 45854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 45954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 46054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 4614e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets whether light touches are enabled. 462b0e0f334422e25542e48901c8451e51c8efab590Steve Block * 463b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @return whether light touches are enabled 464b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @see #setLightTouchEnabled 46554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 46654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public boolean getLightTouchEnabled() { 4673c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 46854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 46954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 47054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 4714e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Controlled a rendering optimization that is no longer present. Setting 4724e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * it now has no effect. 4734e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 4744e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @deprecated This setting now has no effect. 47554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 476adcd2ed8d24deddee528e96260d0ed673eeb261cMike Hearn @Deprecated 47754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setUseDoubleTree(boolean use) { 4783c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon // Specified to do nothing, so no need for derived classes to override. 47954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 48054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 48154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 4824e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Controlled a rendering optimization that is no longer present. Setting 4834e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * it now has no effect. 4844e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 4854e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @deprecated This setting now has no effect. 48654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 487adcd2ed8d24deddee528e96260d0ed673eeb261cMike Hearn @Deprecated 48854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized boolean getUseDoubleTree() { 4893c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon // Returns false unconditionally, so no need for derived classes to override. 490adcd2ed8d24deddee528e96260d0ed673eeb261cMike Hearn return false; 49154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 49254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 49354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 494b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Sets the user-agent string using an integer code. 495b0e0f334422e25542e48901c8451e51c8efab590Steve Block * <ul> 496b0e0f334422e25542e48901c8451e51c8efab590Steve Block * <li>0 means the WebView should use an Android user-agent string</li> 497b0e0f334422e25542e48901c8451e51c8efab590Steve Block * <li>1 means the WebView should use a desktop user-agent string</li> 498b0e0f334422e25542e48901c8451e51c8efab590Steve Block * </ul> 499b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Other values are ignored. The default is an Android user-agent string, 500b0e0f334422e25542e48901c8451e51c8efab590Steve Block * i.e. code value 0. 501f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project * 502b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @param ua the integer code for the user-agent string 503b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @deprecated Please use {@link #setUserAgentString} instead. 50454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 505f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project @Deprecated 50654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setUserAgent(int ua) { 5073c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 50854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 50954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 51054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 511b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Gets the user-agent as an integer code. 512b0e0f334422e25542e48901c8451e51c8efab590Steve Block * <ul> 513b0e0f334422e25542e48901c8451e51c8efab590Steve Block * <li>-1 means the WebView is using a custom user-agent string set with 514b0e0f334422e25542e48901c8451e51c8efab590Steve Block * {@link #setUserAgentString}</li> 515b0e0f334422e25542e48901c8451e51c8efab590Steve Block * <li>0 means the WebView should use an Android user-agent string</li> 516b0e0f334422e25542e48901c8451e51c8efab590Steve Block * <li>1 means the WebView should use a desktop user-agent string</li> 517b0e0f334422e25542e48901c8451e51c8efab590Steve Block * </ul> 518f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project * 519b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @return the integer code for the user-agent string 520b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @see #setUserAgent 521b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @deprecated Please use {@link #getUserAgentString} instead. 52254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 523f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project @Deprecated 52454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized int getUserAgent() { 5253c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 52654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 52754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 52854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 529b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Tells the WebView to use a wide viewport. The default is false. 530b0e0f334422e25542e48901c8451e51c8efab590Steve Block * 531b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @param use whether to use a wide viewport 53254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 53354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setUseWideViewPort(boolean use) { 5343c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 53554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 53654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 53754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 5384e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets whether the WebView is using a wide viewport. 5394e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 5404e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return true if the WebView is using a wide viewport 541b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @see #setUseWideViewPort 54254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 54354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized boolean getUseWideViewPort() { 5443c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 54554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 54654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 54754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 548b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Sets whether the WebView whether supports multiple windows. If set to 549b0e0f334422e25542e48901c8451e51c8efab590Steve Block * true, {@link WebChromeClient#onCreateWindow} must be implemented by the 550b0e0f334422e25542e48901c8451e51c8efab590Steve Block * host application. The default is false. 551b0e0f334422e25542e48901c8451e51c8efab590Steve Block * 552b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @param support whether to suport multiple windows 55354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 55454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setSupportMultipleWindows(boolean support) { 5553c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 55654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 55754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 55854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 559b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Gets whether the WebView supports multiple windows. 5604e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 561b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @return true if the WebView supports multiple windows 562b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @see #setSupportMultipleWindows 56354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 56454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized boolean supportMultipleWindows() { 5653c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 56654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 56754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 56854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 5694e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Sets the underlying layout algorithm. This will cause a relayout of the 570b0e0f334422e25542e48901c8451e51c8efab590Steve Block * WebView. The default is {@link LayoutAlgorithm#NARROW_COLUMNS}. 5714e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 572b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @param l the layout algorithm to use, as a {@link LayoutAlgorithm} value 57354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 57454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setLayoutAlgorithm(LayoutAlgorithm l) { 5753c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 57654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 57754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 57854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 5794e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets the current layout algorithm. 5804e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 581b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @return the layout algorithm in use, as a {@link LayoutAlgorithm} value 5824e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setLayoutAlgorithm 58354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 58454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized LayoutAlgorithm getLayoutAlgorithm() { 5853c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 58654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 58754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 58854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 5894e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Sets the standard font family name. The default is "sans-serif". 5904e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 5914e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param font a font family name 59254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 59354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setStandardFontFamily(String font) { 5943c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 59554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 59654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 59754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 5984e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets the standard font family name. 5994e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 6004e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return the standard font family name as a string 6014e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setStandardFontFamily 60254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 60354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized String getStandardFontFamily() { 6043c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 60554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 60654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 60754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 6084e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Sets the fixed font family name. The default is "monospace". 6094e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 6104e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param font a font family name 61154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 61254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setFixedFontFamily(String font) { 6133c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 61454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 61554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 61654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 6174e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets the fixed font family name. 6184e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 6194e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return the fixed font family name as a string 6204e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setFixedFontFamily 62154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 62254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized String getFixedFontFamily() { 6233c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 62454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 62554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 62654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 627b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Sets the sans-serif font family name. The default is "sans-serif". 6284e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 6294e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param font a font family name 63054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 63154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setSansSerifFontFamily(String font) { 6323c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 63354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 63454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 63554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 6364e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets the sans-serif font family name. 6374e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 6384e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return the sans-serif font family name as a string 639b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @see #setSansSerifFontFamily 64054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 64154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized String getSansSerifFontFamily() { 6423c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 64354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 64454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 64554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 6464e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Sets the serif font family name. The default is "sans-serif". 6474e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 6484e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param font a font family name 64954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 65054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setSerifFontFamily(String font) { 6513c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 65254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 65354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 65454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 6554e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets the serif font family name. The default is "serif". 6564e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 6574e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return the serif font family name as a string 6584e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setSerifFontFamily 65954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 66054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized String getSerifFontFamily() { 6613c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 66254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 66354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 66454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 6654e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Sets the cursive font family name. The default is "cursive". 6664e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 6674e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param font a font family name 66854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 66954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setCursiveFontFamily(String font) { 6703c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 67154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 67254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 67354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 6744e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets the cursive font family name. 6754e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 6764e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return the cursive font family name as a string 6774e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setCursiveFontFamily 67854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 67954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized String getCursiveFontFamily() { 6803c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 68154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 68254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 68354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 6844e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Sets the fantasy font family name. The default is "fantasy". 6854e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 6864e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param font a font family name 68754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 68854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setFantasyFontFamily(String font) { 6893c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 69054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 69154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 69254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 6934e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets the fantasy font family name. 6944e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 6954e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return the fantasy font family name as a string 6964e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setFantasyFontFamily 69754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 69854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized String getFantasyFontFamily() { 6993c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 70054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 70154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 70254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 7034e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Sets the minimum font size. The default is 8. 7044e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 7054e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param size a non-negative integer between 1 and 72. Any number outside 7064e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * the specified range will be pinned. 70754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 70854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setMinimumFontSize(int size) { 7093c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 71054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 71154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 71254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 7134e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets the minimum font size. 7144e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 7154e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return a non-negative integer between 1 and 72 7164e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setMinimumFontSize 71754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 71854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized int getMinimumFontSize() { 7193c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 72054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 72154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 72254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 7234e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Sets the minimum logical font size. The default is 8. 7244e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 7254e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param size a non-negative integer between 1 and 72. Any number outside 7264e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * the specified range will be pinned. 72754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 72854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setMinimumLogicalFontSize(int size) { 7293c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 73054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 73154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 73254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 7334e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets the minimum logical font size. 7344e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 7354e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return a non-negative integer between 1 and 72 7364e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setMinimumLogicalFontSize 73754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 73854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized int getMinimumLogicalFontSize() { 7393c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 74054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 74154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 74254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 7434e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Sets the default font size. The default is 16. 7444e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 7454e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param size a non-negative integer between 1 and 72. Any number outside 7464e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * the specified range will be pinned. 74754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 74854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setDefaultFontSize(int size) { 7493c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 75054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 75154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 75254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 7534e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets the default font size. 7544e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 7554e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return a non-negative integer between 1 and 72 7564e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setDefaultFontSize 75754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 75854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized int getDefaultFontSize() { 7593c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 76054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 76154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 76254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 7634e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Sets the default fixed font size. The default is 16. 7644e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 7654e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param size a non-negative integer between 1 and 72. Any number outside 7664e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * the specified range will be pinned. 76754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 76854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setDefaultFixedFontSize(int size) { 7693c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 77054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 77154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 77254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 7734e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets the default fixed font size. 7744e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 7754e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return a non-negative integer between 1 and 72 7764e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setDefaultFixedFontSize 77754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 77854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized int getDefaultFixedFontSize() { 7793c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 780097b1e777a2a29eef3938338cb0c355203bf1448Grace Kloba } 781097b1e777a2a29eef3938338cb0c355203bf1448Grace Kloba 782097b1e777a2a29eef3938338cb0c355203bf1448Grace Kloba /** 783605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * Sets whether the WebView should load image resources. Note that this method 784605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * controls loading of all images, including those embedded using the data 785605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * URI scheme. Use {@link #setBlockNetworkImage} to control loading only 786605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * of images specified using network URI schemes. Note that if the value of this 787605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * setting is changed from false to true, all images resources referenced 788605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * by content currently displayed by the WebView are loaded automatically. 7894e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * The default is true. 7904e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 7914e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param flag whether the WebView should load image resources 79254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 79354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setLoadsImagesAutomatically(boolean flag) { 7943c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 79554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 79654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 79754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 7984e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets whether the WebView loads image resources. This includes 7994e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * images embedded using the data URI scheme. 8004e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 8014e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return true if the WebView loads image resources 8024e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setLoadsImagesAutomatically 80354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 80454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized boolean getLoadsImagesAutomatically() { 8053c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 80654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 80754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 80854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 809605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * Sets whether the WebView should not load image resources from the 810605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * network (resources accessed via http and https URI schemes). Note 811605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * that this method has no effect unless 812605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * {@link #getLoadsImagesAutomatically} returns true. Also note that 813605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * disabling all network loads using {@link #setBlockNetworkLoads} 814605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * will also prevent network images from loading, even if this flag is set 815605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * to false. When the value of this setting is changed from true to false, 816605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * network images resources referenced by content currently displayed by 8174e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * the WebView are fetched automatically. The default is false. 8184e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 8194e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param flag whether the WebView should not load image resources from the 8204e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * network 821f43113f6216efacc3957fc48d9fa1c0326faccebPatrick Scott * @see #setBlockNetworkLoads 82254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 82354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setBlockNetworkImage(boolean flag) { 8243c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 82554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 82654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 82754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 8284e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets whether the WebView does not load image resources from the network. 8294e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 8304e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return true if the WebView does not load image resources from the network 8314e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setBlockNetworkImage 83254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 83354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized boolean getBlockNetworkImage() { 8343c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 83554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 836adcd2ed8d24deddee528e96260d0ed673eeb261cMike Hearn 837f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project /** 838605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * Sets whether the WebView should not load resources from the network. 839605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * Use {@link #setBlockNetworkImage} to only avoid loading 840605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * image resources. Note that if the value of this setting is 841605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * changed from true to false, network resources referenced by content 842605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * currently displayed by the WebView are not fetched until 843605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * {@link android.webkit.WebView#reload} is called. 844605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * If the application does not have the 845605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * {@link android.Manifest.permission#INTERNET} permission, attempts to set 846605a491c281da79aa1e2aa740f38ab5c0bdb138eMikhail Naganov * a value of false will cause a {@link java.lang.SecurityException} 8474e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * to be thrown. The default value is false if the application has the 8484e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * {@link android.Manifest.permission#INTERNET} permission, otherwise it is 8494e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * true. 8504e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 8514e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param flag whether the WebView should not load any resources from the 8524e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * network 853f43113f6216efacc3957fc48d9fa1c0326faccebPatrick Scott * @see android.webkit.WebView#reload 854f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project */ 855f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project public synchronized void setBlockNetworkLoads(boolean flag) { 8563c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 857f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project } 858f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project 859f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project /** 8604e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets whether the WebView does not load any resources from the network. 8614e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 8624e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return true if the WebView does not load any resources from the network 8634e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setBlockNetworkLoads 864f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project */ 865f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project public synchronized boolean getBlockNetworkLoads() { 8663c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 867f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project } 86854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 86954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 8704e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Tells the WebView to enable JavaScript execution. 8714e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * <b>The default is false.</b> 8724e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 8734e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param flag true if the WebView should execute JavaScript 87454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 87554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setJavaScriptEnabled(boolean flag) { 8763c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 877da7378e86e6d6e7522dfd1e83091545fa93aa84dTeng-Hui Zhu } 878da7378e86e6d6e7522dfd1e83091545fa93aa84dTeng-Hui Zhu 879da7378e86e6d6e7522dfd1e83091545fa93aa84dTeng-Hui Zhu /** 880ef163150805625a148a9715eff6693277f79dcefSteve Block * Sets whether JavaScript running in the context of a file scheme URL 881ef163150805625a148a9715eff6693277f79dcefSteve Block * should be allowed to access content from any origin. This includes 882ef163150805625a148a9715eff6693277f79dcefSteve Block * access to content from other file scheme URLs. See 883ef163150805625a148a9715eff6693277f79dcefSteve Block * {@link #setAllowFileAccessFromFileURLs}. To enable the most restrictive, 884ef163150805625a148a9715eff6693277f79dcefSteve Block * and therefore secure policy, this setting should be disabled. 885ef163150805625a148a9715eff6693277f79dcefSteve Block * <p> 886ef163150805625a148a9715eff6693277f79dcefSteve Block * The default value is true for API level 887ef163150805625a148a9715eff6693277f79dcefSteve Block * {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1} and below, 888ef163150805625a148a9715eff6693277f79dcefSteve Block * and false for API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN} 889ef163150805625a148a9715eff6693277f79dcefSteve Block * and above. 8900ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun * 891ef163150805625a148a9715eff6693277f79dcefSteve Block * @param flag whether JavaScript running in the context of a file scheme 892ef163150805625a148a9715eff6693277f79dcefSteve Block * URL should be allowed to access content from any origin 8930ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun */ 8940ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun public abstract void setAllowUniversalAccessFromFileURLs(boolean flag); 8950ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun 8960ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun /** 897ef163150805625a148a9715eff6693277f79dcefSteve Block * Sets whether JavaScript running in the context of a file scheme URL 898ef163150805625a148a9715eff6693277f79dcefSteve Block * should be allowed to access content from other file scheme URLs. To 899ef163150805625a148a9715eff6693277f79dcefSteve Block * enable the most restrictive, and therefore secure policy, this setting 900ef163150805625a148a9715eff6693277f79dcefSteve Block * should be disabled. Note that the value of this setting is ignored if 901ef163150805625a148a9715eff6693277f79dcefSteve Block * the value of {@link #getAllowUniversalAccessFromFileURLs} is true. 902ef163150805625a148a9715eff6693277f79dcefSteve Block * <p> 903ef163150805625a148a9715eff6693277f79dcefSteve Block * The default value is true for API level 904ef163150805625a148a9715eff6693277f79dcefSteve Block * {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1} and below, 905ef163150805625a148a9715eff6693277f79dcefSteve Block * and false for API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN} 906ef163150805625a148a9715eff6693277f79dcefSteve Block * and above. 9070ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun * 908ef163150805625a148a9715eff6693277f79dcefSteve Block * @param flag whether JavaScript running in the context of a file scheme 909ef163150805625a148a9715eff6693277f79dcefSteve Block * URL should be allowed to access content from other file 910ef163150805625a148a9715eff6693277f79dcefSteve Block * scheme URLs 9110ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun */ 9120ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun public abstract void setAllowFileAccessFromFileURLs(boolean flag); 9130ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun 9140ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun /** 915b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Sets whether the WebView should enable plugins. The default is false. 9164e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 917b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @param flag true if plugins should be enabled 918300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott * @deprecated This method has been deprecated in favor of 919300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott * {@link #setPluginState} 92054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 921a172e7d0d96e4a4db5e2b408e8ee3e96948df9a4Michael Kolb @Deprecated 92254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setPluginsEnabled(boolean flag) { 9233c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 924300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott } 925300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott 926300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott /** 9274e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Tells the WebView to enable, disable, or have plugins on demand. On 928300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott * demand mode means that if a plugin exists that can handle the embedded 929300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott * content, a placeholder icon will be shown instead of the plugin. When 930b0e0f334422e25542e48901c8451e51c8efab590Steve Block * the placeholder is clicked, the plugin will be enabled. The default is 931b0e0f334422e25542e48901c8451e51c8efab590Steve Block * {@link PluginState#OFF}. 9324e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 9334e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param state a PluginState value 934300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott */ 935300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott public synchronized void setPluginState(PluginState state) { 9363c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 93754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 93854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 93954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 9404e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Sets a custom path to plugins used by the WebView. This method is 941fdbdeb3137a6b47527d1d714afbb7e1b19b474ecDerek Sollenberger * obsolete since each plugin is now loaded from its own package. 9424e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 9434e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param pluginsPath a String path to the directory containing plugins 944fdbdeb3137a6b47527d1d714afbb7e1b19b474ecDerek Sollenberger * @deprecated This method is no longer used as plugins are loaded from 9454e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * their own APK via the system's package manager. 94654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 9479dc2e75e2720a8d0a5d7b87be53300eac021a3f3Jason Chen @Deprecated 94854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setPluginsPath(String pluginsPath) { 9493c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon // Specified to do nothing, so no need for derived classes to override. 95054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 95154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 95254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 9534e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Sets the path to where database storage API databases should be saved. 95472ca7a45ac4a911435a60361964a15045515eaf5Steve Block * In order for the database storage API to function correctly, this method 95572ca7a45ac4a911435a60361964a15045515eaf5Steve Block * must be called with a path to which the application can write. This 95672ca7a45ac4a911435a60361964a15045515eaf5Steve Block * method should only be called once: repeated calls are ignored. 9574e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 95872ca7a45ac4a911435a60361964a15045515eaf5Steve Block * @param databasePath a path to the directory where databases should be 95972ca7a45ac4a911435a60361964a15045515eaf5Steve Block * saved. 9607df1985e86635af006be3dfa65987d60e290b5deBen Murdoch */ 9614e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block // This will update WebCore when the Sync runs in the C++ side. 96272ca7a45ac4a911435a60361964a15045515eaf5Steve Block // Note that the WebCore Database Tracker only allows the path to be set 96372ca7a45ac4a911435a60361964a15045515eaf5Steve Block // once. 9647df1985e86635af006be3dfa65987d60e290b5deBen Murdoch public synchronized void setDatabasePath(String databasePath) { 9653c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 9667df1985e86635af006be3dfa65987d60e290b5deBen Murdoch } 9677df1985e86635af006be3dfa65987d60e290b5deBen Murdoch 9687df1985e86635af006be3dfa65987d60e290b5deBen Murdoch /** 96972ca7a45ac4a911435a60361964a15045515eaf5Steve Block * Sets the path where the Geolocation databases should be saved. In order 97072ca7a45ac4a911435a60361964a15045515eaf5Steve Block * for Geolocation permissions and cached positions to be persisted, this 97172ca7a45ac4a911435a60361964a15045515eaf5Steve Block * method must be called with a path to which the application can write. 9724e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 97372ca7a45ac4a911435a60361964a15045515eaf5Steve Block * @param databasePath a path to the directory where databases should be 97472ca7a45ac4a911435a60361964a15045515eaf5Steve Block * saved. 9759d3273f62288fa54536a3928383588398ca2d029Steve Block */ 9764e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block // This will update WebCore when the Sync runs in the C++ side. 9779d3273f62288fa54536a3928383588398ca2d029Steve Block public synchronized void setGeolocationDatabasePath(String databasePath) { 9783c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 9799d3273f62288fa54536a3928383588398ca2d029Steve Block } 9809d3273f62288fa54536a3928383588398ca2d029Steve Block 9819d3273f62288fa54536a3928383588398ca2d029Steve Block /** 98272ca7a45ac4a911435a60361964a15045515eaf5Steve Block * Sets whether the Application Caches API should be enabled. The default 98372ca7a45ac4a911435a60361964a15045515eaf5Steve Block * is false. Note that in order for the Application Caches API to be 98472ca7a45ac4a911435a60361964a15045515eaf5Steve Block * enabled, a valid database path must also be supplied to 98572ca7a45ac4a911435a60361964a15045515eaf5Steve Block * {@link #setAppCachePath}. 9864e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 9874e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param flag true if the WebView should enable Application Caches 98860a9a7d05577a65c8904fcb5f32b6a7a10886a13Andrei Popescu */ 98960a9a7d05577a65c8904fcb5f32b6a7a10886a13Andrei Popescu public synchronized void setAppCacheEnabled(boolean flag) { 9903c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 99160a9a7d05577a65c8904fcb5f32b6a7a10886a13Andrei Popescu } 99260a9a7d05577a65c8904fcb5f32b6a7a10886a13Andrei Popescu 99360a9a7d05577a65c8904fcb5f32b6a7a10886a13Andrei Popescu /** 99472ca7a45ac4a911435a60361964a15045515eaf5Steve Block * Sets the path to the Application Caches files. In order for the 99572ca7a45ac4a911435a60361964a15045515eaf5Steve Block * Application Caches API to be enabled, this method must be called with a 99672ca7a45ac4a911435a60361964a15045515eaf5Steve Block * path to which the application can write. This method should only be 99772ca7a45ac4a911435a60361964a15045515eaf5Steve Block * called once: repeated calls are ignored. 9984e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 9994e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param appCachePath a String path to the directory containing 100072ca7a45ac4a911435a60361964a15045515eaf5Steve Block * Application Caches files. 100172ca7a45ac4a911435a60361964a15045515eaf5Steve Block * @see setAppCacheEnabled 100260a9a7d05577a65c8904fcb5f32b6a7a10886a13Andrei Popescu */ 10033c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon public synchronized void setAppCachePath(String appCachePath) { 10043c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 100560a9a7d05577a65c8904fcb5f32b6a7a10886a13Andrei Popescu } 100660a9a7d05577a65c8904fcb5f32b6a7a10886a13Andrei Popescu 100760a9a7d05577a65c8904fcb5f32b6a7a10886a13Andrei Popescu /** 1008b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Sets the maximum size for the Application Caches content. The default is 1009b0e0f334422e25542e48901c8451e51c8efab590Steve Block * {@link Long#MAX_VALUE}. 10104e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 10114e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param appCacheMaxSize the maximum size in bytes 10121c829208eadf175ad4600e70a14013b50a20adfeAndrei Popescu */ 10131c829208eadf175ad4600e70a14013b50a20adfeAndrei Popescu public synchronized void setAppCacheMaxSize(long appCacheMaxSize) { 10143c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 10151c829208eadf175ad4600e70a14013b50a20adfeAndrei Popescu } 10161c829208eadf175ad4600e70a14013b50a20adfeAndrei Popescu 10171c829208eadf175ad4600e70a14013b50a20adfeAndrei Popescu /** 1018b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Sets whether the database storage API is enabled. The default value is 1019b0e0f334422e25542e48901c8451e51c8efab590Steve Block * false. See also {@link #setDatabasePath} for how to correctly set up the 1020b0e0f334422e25542e48901c8451e51c8efab590Steve Block * database storage API. 10214e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 10224e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param flag true if the WebView should use the database storage API 10237df1985e86635af006be3dfa65987d60e290b5deBen Murdoch */ 10247df1985e86635af006be3dfa65987d60e290b5deBen Murdoch public synchronized void setDatabaseEnabled(boolean flag) { 10253c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 10267df1985e86635af006be3dfa65987d60e290b5deBen Murdoch } 10277df1985e86635af006be3dfa65987d60e290b5deBen Murdoch 10287df1985e86635af006be3dfa65987d60e290b5deBen Murdoch /** 1029b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Sets whether the DOM storage API is enabled. The default value is false. 10304e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 10314e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param flag true if the WebView should use the DOM storage API 1032274680d9b8fce08f31c23dda796ecec937c942deBen Murdoch */ 1033274680d9b8fce08f31c23dda796ecec937c942deBen Murdoch public synchronized void setDomStorageEnabled(boolean flag) { 10343c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 1035274680d9b8fce08f31c23dda796ecec937c942deBen Murdoch } 1036274680d9b8fce08f31c23dda796ecec937c942deBen Murdoch 1037274680d9b8fce08f31c23dda796ecec937c942deBen Murdoch /** 10384e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets whether the DOM Storage APIs are enabled. 10394e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 10404e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return true if the DOM Storage APIs are enabled 1041b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @see #setDomStorageEnabled 1042274680d9b8fce08f31c23dda796ecec937c942deBen Murdoch */ 1043274680d9b8fce08f31c23dda796ecec937c942deBen Murdoch public synchronized boolean getDomStorageEnabled() { 10443c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 1045274680d9b8fce08f31c23dda796ecec937c942deBen Murdoch } 1046274680d9b8fce08f31c23dda796ecec937c942deBen Murdoch /** 1047b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Gets the path to where database storage API databases are saved. 10484e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 10494e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return the String path to the database storage API databases 1050b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @see #setDatabasePath 10517df1985e86635af006be3dfa65987d60e290b5deBen Murdoch */ 10527df1985e86635af006be3dfa65987d60e290b5deBen Murdoch public synchronized String getDatabasePath() { 10533c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 10547df1985e86635af006be3dfa65987d60e290b5deBen Murdoch } 10557df1985e86635af006be3dfa65987d60e290b5deBen Murdoch 10567df1985e86635af006be3dfa65987d60e290b5deBen Murdoch /** 10574e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets whether the database storage API is enabled. 10584e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 10594e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return true if the database storage API is enabled 1060b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @see #setDatabaseEnabled 10617df1985e86635af006be3dfa65987d60e290b5deBen Murdoch */ 10627df1985e86635af006be3dfa65987d60e290b5deBen Murdoch public synchronized boolean getDatabaseEnabled() { 10633c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 1064c27a9acb3b7ec4d1845b623cc167e0b62b1d0585Andrei Popescu } 1065c27a9acb3b7ec4d1845b623cc167e0b62b1d0585Andrei Popescu 1066c27a9acb3b7ec4d1845b623cc167e0b62b1d0585Andrei Popescu /** 1067b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Sets whether Geolocation is enabled. The default is true. See also 1068b0e0f334422e25542e48901c8451e51c8efab590Steve Block * {@link #setGeolocationDatabasePath} for how to correctly set up 1069b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Geolocation. 10704e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 10714e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param flag whether Geolocation should be enabled 107206cd751b052e65c359b16cce0570b6fab305eb89Steve Block */ 107306cd751b052e65c359b16cce0570b6fab305eb89Steve Block public synchronized void setGeolocationEnabled(boolean flag) { 10743c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 10755dc0c8253b368239a90d7176ff6325ae5ba371b3Elliott Slaughter } 10765dc0c8253b368239a90d7176ff6325ae5ba371b3Elliott Slaughter 10775dc0c8253b368239a90d7176ff6325ae5ba371b3Elliott Slaughter /** 10784e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets whether JavaScript is enabled. 10794e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 10804e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return true if JavaScript is enabled 10814e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setJavaScriptEnabled 108254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 108354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized boolean getJavaScriptEnabled() { 10843c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 108554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 108654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 108754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 1088ef163150805625a148a9715eff6693277f79dcefSteve Block * Gets whether JavaScript running in the context of a file scheme URL can 1089ef163150805625a148a9715eff6693277f79dcefSteve Block * access content from any origin. This includes access to content from 1090ef163150805625a148a9715eff6693277f79dcefSteve Block * other file scheme URLs. 10910ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun * 1092ef163150805625a148a9715eff6693277f79dcefSteve Block * @return whether JavaScript running in the context of a file scheme URL 1093ef163150805625a148a9715eff6693277f79dcefSteve Block * can access content from any origin 10944e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setAllowUniversalAccessFromFileURLs 10950ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun */ 10960ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun public abstract boolean getAllowUniversalAccessFromFileURLs(); 10970ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun 10980ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun /** 1099ef163150805625a148a9715eff6693277f79dcefSteve Block * Gets whether JavaScript running in the context of a file scheme URL can 1100ef163150805625a148a9715eff6693277f79dcefSteve Block * access content from other file scheme URLs. 11010ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun * 1102ef163150805625a148a9715eff6693277f79dcefSteve Block * @return whether JavaScript running in the context of a file scheme URL 1103ef163150805625a148a9715eff6693277f79dcefSteve Block * can access content from other file scheme URLs 11044e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setAllowFileAccessFromFileURLs 11050ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun */ 11060ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun public abstract boolean getAllowFileAccessFromFileURLs(); 11070ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun 11080ea6dad65eb77f9347a59704b1f8a019cfc9e01fSelim Gurun /** 11094e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets whether plugins are enabled. 11104e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 11114e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return true if plugins are enabled 1112b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @see #setPluginsEnabled 1113300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott * @deprecated This method has been replaced by {@link #getPluginState} 111454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 1115a172e7d0d96e4a4db5e2b408e8ee3e96948df9a4Michael Kolb @Deprecated 111654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized boolean getPluginsEnabled() { 11173c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 1118300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott } 1119300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott 1120300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott /** 1121b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Gets the current state regarding whether plugins are enabled. 11224e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 1123b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @return the plugin state as a {@link PluginState} value 1124b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @see #setPluginState 1125300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott */ 1126300f2e95a4cecebb80c2c55418745df5c0c2fb6cPatrick Scott public synchronized PluginState getPluginState() { 11273c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 112854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 112954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 113054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 11314e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets the directory that contains the plugin libraries. This method is 1132fdbdeb3137a6b47527d1d714afbb7e1b19b474ecDerek Sollenberger * obsolete since each plugin is now loaded from its own package. 11334e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 11344e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return an empty string 1135fdbdeb3137a6b47527d1d714afbb7e1b19b474ecDerek Sollenberger * @deprecated This method is no longer used as plugins are loaded from 1136fdbdeb3137a6b47527d1d714afbb7e1b19b474ecDerek Sollenberger * their own APK via the system's package manager. 113754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 11389dc2e75e2720a8d0a5d7b87be53300eac021a3f3Jason Chen @Deprecated 113954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized String getPluginsPath() { 11403c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon // Unconditionally returns empty string, so no need for derived classes to override. 1141658ab7d787f64987d7c45aae08e5a12a073afe78Grace Kloba return ""; 114254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 114354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 114454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 11454e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Tells JavaScript to open windows automatically. This applies to the 11464e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * JavaScript function window.open(). The default is false. 11474e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 11484e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param flag true if JavaScript can open windows automatically 114954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 11503c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon public synchronized void setJavaScriptCanOpenWindowsAutomatically(boolean flag) { 11513c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 115254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 115354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 115454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 11554e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets whether JavaScript can open windows automatically. 11564e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 11574e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return true if JavaScript can open windows automatically during 11584e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * window.open() 11594e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setJavaScriptCanOpenWindowsAutomatically 116054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 116154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized boolean getJavaScriptCanOpenWindowsAutomatically() { 11623c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 116354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 116454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 11654e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Sets the default text encoding name to use when decoding html pages. 11664e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * The default is "Latin-1". 11674e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 11684e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param encoding the text encoding name 116954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 117054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setDefaultTextEncodingName(String encoding) { 11713c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 117254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 117354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 117454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 11754e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets the default text encoding name. 11764e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 11774e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @return the default text encoding name as a string 11784e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @see #setDefaultTextEncodingName 117954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 118054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized String getDefaultTextEncodingName() { 11813c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 118254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 118354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 1184f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project /** 1185b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Sets the WebView's user-agent string. If the string is null or empty, 1186b0e0f334422e25542e48901c8451e51c8efab590Steve Block * the system default value will be used. 1187f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project */ 1188f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project public synchronized void setUserAgentString(String ua) { 11893c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 1190f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project } 1191f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project 1192f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project /** 11934e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Gets the WebView's user-agent string. 1194b0e0f334422e25542e48901c8451e51c8efab590Steve Block * 1195b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @return the WebView's user-agent string 1196b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @see #setUserAgentString 1197f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project */ 1198f013e1afd1e68af5e3b868c26a653bbfb39538f8The Android Open Source Project public synchronized String getUserAgentString() { 11993c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 1200c55886aee84034f7fcf4431fdbeeaff1a9eafbd9Shimeng (Simon) Wang } 1201c55886aee84034f7fcf4431fdbeeaff1a9eafbd9Shimeng (Simon) Wang 120254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 12034e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Tells the WebView whether it needs to set a node to have focus when 1204b0e0f334422e25542e48901c8451e51c8efab590Steve Block * {@link WebView#requestFocus(int, android.graphics.Rect)} is called. The 1205b0e0f334422e25542e48901c8451e51c8efab590Steve Block * default value is true. 1206a172e7d0d96e4a4db5e2b408e8ee3e96948df9a4Michael Kolb * 12074e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * @param flag whether the WebView needs to set a node 120854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 120954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public void setNeedInitialFocus(boolean flag) { 12103c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 121154b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 121254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project 121354b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 12144e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Sets the priority of the Render thread. Unlike the other settings, this 1215b0e0f334422e25542e48901c8451e51c8efab590Steve Block * one only needs to be called once per process. The default value is 1216b0e0f334422e25542e48901c8451e51c8efab590Steve Block * {@link RenderPriority#NORMAL}. 1217adcd2ed8d24deddee528e96260d0ed673eeb261cMike Hearn * 1218b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @param priority the priority 121954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 122054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public synchronized void setRenderPriority(RenderPriority priority) { 12213c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 122254b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 1223a172e7d0d96e4a4db5e2b408e8ee3e96948df9a4Michael Kolb 122454b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 12254e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * Overrides the way the cache is used. The way the cache is used is based 1226b0e0f334422e25542e48901c8451e51c8efab590Steve Block * on the navigation type. For a normal page load, the cache is checked 122754b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project * and content is re-validated as needed. When navigating back, content is 1228b0e0f334422e25542e48901c8451e51c8efab590Steve Block * not revalidated, instead the content is just retrieved from the cache. 1229b0e0f334422e25542e48901c8451e51c8efab590Steve Block * This method allows the client to override this behavior by specifying 1230b0e0f334422e25542e48901c8451e51c8efab590Steve Block * one of {@link #LOAD_DEFAULT}, {@link #LOAD_NORMAL}, 1231b0e0f334422e25542e48901c8451e51c8efab590Steve Block * {@link #LOAD_CACHE_ELSE_NETWORK}, {@link #LOAD_NO_CACHE} or 1232b0e0f334422e25542e48901c8451e51c8efab590Steve Block * {@link #LOAD_CACHE_ONLY}. The default value is {@link #LOAD_DEFAULT}. 12334e584df4cee8334bc371c04a67bcd0a32e2f9480Steve Block * 1234b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @param mode the mode to use 123554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 123654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public void setCacheMode(int mode) { 12373c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 123854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 1239a172e7d0d96e4a4db5e2b408e8ee3e96948df9a4Michael Kolb 124054b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project /** 1241b0e0f334422e25542e48901c8451e51c8efab590Steve Block * Gets the current setting for overriding the cache mode. 1242b0e0f334422e25542e48901c8451e51c8efab590Steve Block * 1243b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @return the current setting for overriding the cache mode 1244b0e0f334422e25542e48901c8451e51c8efab590Steve Block * @see #setCacheMode 124554b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project */ 124654b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project public int getCacheMode() { 12473c90952036a5ff7ddb2946c643f1a0bf1c31d53aJonathan Dixon throw new MustOverrideException(); 124854b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project } 124954b6cfa9a9e5b861a9930af873580d6dc20f773The Android Open Source Project} 1250