diff options
author | Feng Qian <fqian@google.com> | 2009-06-29 15:58:08 -0700 |
---|---|---|
committer | Feng Qian <fqian@google.com> | 2009-06-29 17:35:44 -0700 |
commit | b3c02da4553b1a629b16377970fdabae28394c94 (patch) | |
tree | 8ea6510502cacac6f82ec038c349231232e70efb /src/com/android/browser/BrowserSettings.java | |
parent | accf2c92c7ea0379d1336d5d8a0f0c3e7ddce3e2 (diff) | |
download | packages_apps_Browser-b3c02da4553b1a629b16377970fdabae28394c94.zip packages_apps_Browser-b3c02da4553b1a629b16377970fdabae28394c94.tar.gz packages_apps_Browser-b3c02da4553b1a629b16377970fdabae28394c94.tar.bz2 |
Add a UI for setting JS flags.
The UI only shows up when 'about:debug' is typed in the address bar.
JS flags are a string '--heap-stats --log-gc' in V8 etc.
Currently this is only used by V8 build for debugging purpose.
Diffstat (limited to 'src/com/android/browser/BrowserSettings.java')
-rw-r--r-- | src/com/android/browser/BrowserSettings.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java index 4f4d440..762149b 100644 --- a/src/com/android/browser/BrowserSettings.java +++ b/src/com/android/browser/BrowserSettings.java @@ -83,6 +83,7 @@ class BrowserSettings extends Observable { private boolean appCacheEnabled = true; private String appCachePath; // default value set in loadFromDb(). private boolean domStorageEnabled = true; + private String jsFlags = ""; private final static String TAG = "BrowserSettings"; @@ -94,6 +95,7 @@ class BrowserSettings extends Observable { private boolean tracing = false; private boolean lightTouch = false; private boolean navDump = false; + // Browser only settings private boolean doFlick = false; @@ -327,7 +329,9 @@ class BrowserSettings extends Observable { mTabControl.getBrowserActivity().setBaseSearchUrl( p.getString("search_url", "")); } - update(); + // JS flags is loaded from DB even if showDebugSettings is false, + // so that it can be set once and be effective all the time. + jsFlags = p.getString("js_engine_flags", ""); } public String getPluginsPath() { @@ -338,6 +342,10 @@ class BrowserSettings extends Observable { return homeUrl; } + public String getJsFlags() { + return jsFlags; + } + public void setHomePage(Context context, String url) { Editor ed = PreferenceManager. getDefaultSharedPreferences(context).edit(); |