Home | History | Annotate | Download | only in browser

Lines Matching refs:Settings

31 import android.provider.Settings;
58 * Class for managing settings
120 // Current state of network-dependent settings
127 // Cached settings
157 public void startManagingSettings(WebSettings settings) {
164 syncStaticSettings(settings);
165 syncSetting(settings);
166 mManagedSettings.add(new WeakReference<WebSettings>(settings));
170 public void stopManagingSettings(WebSettings settings) {
174 if (ref.get() == settings) {
253 * Syncs all the settings that have a Preference UI
255 private void syncSetting(WebSettings settings) {
256 settings.setGeolocationEnabled(enableGeolocation());
257 settings.setJavaScriptEnabled(enableJavascript());
258 settings.setLightTouchEnabled(enableLightTouch());
259 settings.setNavDump(enableNavDump());
260 settings.setDefaultTextEncodingName(getDefaultTextEncoding());
261 settings.setDefaultZoom(getDefaultZoom());
262 settings.setMinimumFontSize(getMinimumFontSize());
263 settings.setMinimumLogicalFontSize(getMinimumFontSize());
264 settings.setPluginState(getPluginState());
265 settings.setTextZoom(getTextZoom());
266 settings.setLayoutAlgorithm(getLayoutAlgorithm());
267 settings.setJavaScriptCanOpenWindowsAutomatically(!blockPopupWindows());
268 settings.setLoadsImagesAutomatically(loadImages());
269 settings.setLoadWithOverviewMode(loadPageInOverviewMode());
270 settings.setSavePassword(rememberPasswords());
271 settings.setSaveFormData(saveFormdata());
272 settings.setUseWideViewPort(isWideViewport());
274 String ua = mCustomUserAgents.get(settings);
276 settings.setUserAgentString(ua);
278 settings.setUserAgentString(USER_AGENTS[getUserAgent()]);
281 if (!(settings instanceof WebSettingsClassic)) return;
283 WebSettingsClassic settingsClassic = (WebSettingsClassic) settings;
308 * Syncs all the settings that have no UI
311 private void syncStaticSettings(WebSettings settings) {
312 settings.setDefaultFontSize(16);
313 settings.setDefaultFixedFontSize(13);
316 settings.setNeedInitialFocus(false);
318 settings.setSupportMultipleWindows(true);
321 settings.setEnableSmoothTransition(true);
323 settings.setAllowContentAccess(false);
326 settings.setAppCacheEnabled(true);
327 settings.setDatabaseEnabled(true);
328 settings.setDomStorageEnabled(true);
331 settings.setAppCacheMaxSize(getWebStorageSizeManager().getAppCacheMaxSize());
332 settings.setAppCachePath(getAppCachePath());
333 settings.setDatabasePath(mContext.getDir("databases", 0).getPath());
334 settings.setGeolocationDatabasePath(mContext.getDir("geolocation", 0).getPath());
336 settings.setAllowUniversalAccessFromFileURLs(false);
337 settings.setAllowFileAccessFromFileURLs(false);
339 if (!(settings instanceof WebSettingsClassic)) return;
341 WebSettingsClassic settingsClassic = (WebSettingsClassic) settings;
367 WebSettings settings = ref.get();
368 if (settings == null) {
372 syncSetting(settings);
533 // so we need to force a settings sync (otherwise the SharedPreferences
551 WebSettings settings = view.getSettings();
552 if (mCustomUserAgents.get(settings) != null) {
553 mCustomUserAgents.remove(settings);
554 settings.setUserAgentString(USER_AGENTS[getUserAgent()]);
556 mCustomUserAgents.put(settings, DESKTOP_USERAGENT);
557 settings.setUserAgentString(DESKTOP_USERAGENT);
896 String preload = Settings.Secure.getString(mContext.getContentResolver(),
920 String preload = Settings.Secure.getString(mContext.getContentResolver(),