Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/ContentSettings.java

Issue 11192057: [Android] Add supportMultipleWindows setting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed, moved fields in WebPreferences. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/view_messages.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.os.Handler; 7 import android.os.Handler;
8 import android.os.Looper; 8 import android.os.Looper;
9 import android.os.Message; 9 import android.os.Message;
10 import android.webkit.WebSettings.PluginState; 10 import android.webkit.WebSettings.PluginState;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 private int mMinimumFontSize = 8; 67 private int mMinimumFontSize = 8;
68 private int mMinimumLogicalFontSize = 8; 68 private int mMinimumLogicalFontSize = 8;
69 private int mDefaultFontSize = 16; 69 private int mDefaultFontSize = 16;
70 private int mDefaultFixedFontSize = 13; 70 private int mDefaultFixedFontSize = 13;
71 private boolean mLoadsImagesAutomatically = true; 71 private boolean mLoadsImagesAutomatically = true;
72 private boolean mImagesEnabled = true; 72 private boolean mImagesEnabled = true;
73 private boolean mJavaScriptEnabled = false; 73 private boolean mJavaScriptEnabled = false;
74 private boolean mAllowUniversalAccessFromFileURLs = false; 74 private boolean mAllowUniversalAccessFromFileURLs = false;
75 private boolean mAllowFileAccessFromFileURLs = false; 75 private boolean mAllowFileAccessFromFileURLs = false;
76 private boolean mJavaScriptCanOpenWindowsAutomatically = false; 76 private boolean mJavaScriptCanOpenWindowsAutomatically = false;
77 private boolean mSupportMultipleWindows = false;
77 private PluginState mPluginState = PluginState.OFF; 78 private PluginState mPluginState = PluginState.OFF;
78 private boolean mDomStorageEnabled = false; 79 private boolean mDomStorageEnabled = false;
79 80
80 // Not accessed by the native side. 81 // Not accessed by the native side.
81 private String mDefaultUserAgent = ""; 82 private String mDefaultUserAgent = "";
82 private boolean mSupportZoom = true; 83 private boolean mSupportZoom = true;
83 private boolean mBuiltInZoomControls = false; 84 private boolean mBuiltInZoomControls = false;
84 private boolean mDisplayZoomControls = true; 85 private boolean mDisplayZoomControls = true;
85 86
86 // Class to handle messages to be processed on the UI thread. 87 // Class to handle messages to be processed on the UI thread.
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 * @return True if javascript can open windows automatically during 881 * @return True if javascript can open windows automatically during
881 * window.open(). 882 * window.open().
882 */ 883 */
883 public boolean getJavaScriptCanOpenWindowsAutomatically() { 884 public boolean getJavaScriptCanOpenWindowsAutomatically() {
884 synchronized (mContentSettingsLock) { 885 synchronized (mContentSettingsLock) {
885 return mJavaScriptCanOpenWindowsAutomatically; 886 return mJavaScriptCanOpenWindowsAutomatically;
886 } 887 }
887 } 888 }
888 889
889 /** 890 /**
891 * Tells the WebView whether it supports multiple windows. True means
892 * that {@link WebChromeClient#onCreateWindow(WebView, boolean,
893 * boolean, Message)} is implemented by the host application.
894 */
895 public void setSupportMultipleWindows(boolean support) {
896 assert mCanModifySettings;
897 synchronized (mContentSettingsLock) {
898 if (mSupportMultipleWindows != support) {
899 mSupportMultipleWindows = support;
900 mEventHandler.syncSettingsLocked();
901 }
902 }
903 }
904
905 /**
906 * Gets whether the WebView is supporting multiple windows.
907 *
908 * @return true if the WebView is supporting multiple windows. This means
909 * that {@link WebChromeClient#onCreateWindow(WebView, boolean,
910 * boolean, Message)} is implemented by the host application.
911 */
912 public boolean supportMultipleWindows() {
913 synchronized (mContentSettingsLock) {
914 return mSupportMultipleWindows;
915 }
916 }
917
918 /**
890 * Sets whether the DOM storage API is enabled. The default value is false. 919 * Sets whether the DOM storage API is enabled. The default value is false.
891 * 920 *
892 * @param flag true if the ContentView should use the DOM storage API 921 * @param flag true if the ContentView should use the DOM storage API
893 */ 922 */
894 public void setDomStorageEnabled(boolean flag) { 923 public void setDomStorageEnabled(boolean flag) {
895 assert mCanModifySettings; 924 assert mCanModifySettings;
896 synchronized (mContentSettingsLock) { 925 synchronized (mContentSettingsLock) {
897 if (mDomStorageEnabled != flag) { 926 if (mDomStorageEnabled != flag) {
898 mDomStorageEnabled = flag; 927 mDomStorageEnabled = flag;
899 mEventHandler.syncSettingsLocked(); 928 mEventHandler.syncSettingsLocked();
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 private native int nativeInit(int contentViewPtr, boolean isMasterMode); 1000 private native int nativeInit(int contentViewPtr, boolean isMasterMode);
972 1001
973 private static native String nativeGetDefaultUserAgent(); 1002 private static native String nativeGetDefaultUserAgent();
974 1003
975 // Synchronize Java settings from native settings. 1004 // Synchronize Java settings from native settings.
976 private native void nativeSyncFromNative(int nativeContentSettings); 1005 private native void nativeSyncFromNative(int nativeContentSettings);
977 1006
978 // Synchronize native settings from Java settings. 1007 // Synchronize native settings from Java settings.
979 private native void nativeSyncToNative(int nativeContentSettings); 1008 private native void nativeSyncToNative(int nativeContentSettings);
980 } 1009 }
OLDNEW
« no previous file with comments | « content/common/view_messages.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698