forked from mirrors/gecko-dev
Bug 1448077 - move DevTools prefs from libpref/init/all.js to devtools/shared;r=jryans
See RFC https://github.com/devtools-html/rfcs/issues/43 MozReview-Commit-ID: 8YMWCFsJM7A --HG-- extra : rebase_source : 70a207e256b92a896e8795ec10012d5102add91a
This commit is contained in:
parent
886ae7b748
commit
a9bafec617
7 changed files with 95 additions and 80 deletions
|
|
@ -153,6 +153,7 @@ devtools/client/debugger/new/**
|
|||
|
||||
# Ignore devtools preferences files
|
||||
devtools/client/preferences/**
|
||||
devtools/shared/preferences/**
|
||||
devtools/startup/preferences/devtools-startup.js
|
||||
|
||||
# Ignore devtools third-party libs
|
||||
|
|
|
|||
|
|
@ -72,12 +72,15 @@ To create a new preference, it should be assigned a default value. Default prefe
|
|||
defined in preferences files such as:
|
||||
- devtools/client/preferences/devtools-client.js
|
||||
- devtools/client/preferences/debugger.js
|
||||
- devtools/shared/preferences/devtools-shared.js
|
||||
- devtools/startup/preferences/devtools-startup.js
|
||||
|
||||
Most new preferences should go in devtools/client/preferences/devtools-client.js. Debugger
|
||||
specific preferences should go in devtools/client/preferences/debugger.js. Finally if a
|
||||
preference needs to be available very early during the Firefox startup sequence, it should
|
||||
go in devtools/startup/preferences/devtools-startup.js.
|
||||
specific preferences should go in devtools/client/preferences/debugger.js. If a preference
|
||||
should be available even when the client for DevTools is not shipped (for instance on
|
||||
Fennec) the preference should go to devtools/shared/preferences/devtools-shared.js.
|
||||
Finally if a preference needs to be available very early during the Firefox startup
|
||||
sequence, it should go in devtools/startup/preferences/devtools-startup.js.
|
||||
|
||||
### Projects using Launchpad
|
||||
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ if CONFIG['MOZ_DEVTOOLS'] == 'all':
|
|||
|
||||
# `platform` contains all native components
|
||||
DIRS += [
|
||||
'platform',
|
||||
'server',
|
||||
'shared',
|
||||
'startup',
|
||||
'platform',
|
||||
]
|
||||
|
||||
# /browser uses DIST_SUBDIR. We opt-in to this treatment when building
|
||||
|
|
|
|||
4
devtools/shared/preferences/README.md
Normal file
4
devtools/shared/preferences/README.md
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# How is devtools-shared loaded?
|
||||
|
||||
This preference file is included via modules/libpref/greprefs.js which guarantees it will
|
||||
be loaded on all distributions, including xpcshell binary.
|
||||
82
devtools/shared/preferences/devtools-shared.js
Normal file
82
devtools/shared/preferences/devtools-shared.js
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// Tells if DevTools have been explicitely enabled by the user.
|
||||
// This pref allows to disable all features related to DevTools
|
||||
// for users that never use them.
|
||||
// Until bug 1361080 lands, we always consider them enabled.
|
||||
pref("devtools.enabled", true);
|
||||
|
||||
// Enable deprecation warnings.
|
||||
pref("devtools.errorconsole.deprecation_warnings", true);
|
||||
|
||||
#ifdef NIGHTLY_BUILD
|
||||
// Don't show the Browser Toolbox prompt on local builds / nightly
|
||||
pref("devtools.debugger.prompt-connection", false, sticky);
|
||||
#else
|
||||
pref("devtools.debugger.prompt-connection", true, sticky);
|
||||
#endif
|
||||
|
||||
#ifdef MOZILLA_OFFICIAL
|
||||
// Disable debugging chrome
|
||||
pref("devtools.chrome.enabled", false, sticky);
|
||||
// Disable remote debugging connections
|
||||
pref("devtools.debugger.remote-enabled", false, sticky);
|
||||
#else
|
||||
// In local builds, enable the browser toolbox by default
|
||||
pref("devtools.chrome.enabled", true, sticky);
|
||||
pref("devtools.debugger.remote-enabled", true, sticky);
|
||||
#endif
|
||||
|
||||
// Disable remote debugging protocol logging
|
||||
pref("devtools.debugger.log", false);
|
||||
pref("devtools.debugger.log.verbose", false);
|
||||
|
||||
pref("devtools.debugger.remote-port", 6000);
|
||||
pref("devtools.debugger.remote-websocket", false);
|
||||
// Force debugger server binding on the loopback interface
|
||||
pref("devtools.debugger.force-local", true);
|
||||
// Block tools from seeing / interacting with certified apps
|
||||
pref("devtools.debugger.forbid-certified-apps", true);
|
||||
|
||||
// Limit for intercepted response bodies (1 MB)
|
||||
// Possible values:
|
||||
// 0 => the response body has no limit
|
||||
// n => represents max number of bytes stored
|
||||
pref("devtools.netmonitor.responseBodyLimit", 1048576);
|
||||
|
||||
// DevTools default color unit
|
||||
pref("devtools.defaultColorUnit", "authored");
|
||||
|
||||
// Used for devtools debugging
|
||||
pref("devtools.dump.emit", false);
|
||||
|
||||
// Disable device discovery logging
|
||||
pref("devtools.discovery.log", false);
|
||||
// Whether to scan for DevTools devices via WiFi
|
||||
pref("devtools.remote.wifi.scan", true);
|
||||
// Client must complete TLS handshake within this window (ms)
|
||||
pref("devtools.remote.tls-handshake-timeout", 10000);
|
||||
|
||||
// URL of the remote JSON catalog used for device simulation
|
||||
pref("devtools.devices.url", "https://code.cdn.mozilla.net/devices/devices.json");
|
||||
|
||||
// Display the introductory text
|
||||
pref("devtools.gcli.hideIntro", false);
|
||||
|
||||
// How eager are we to show help: never=1, sometimes=2, always=3
|
||||
pref("devtools.gcli.eagerHelper", 2);
|
||||
|
||||
// Alias to the script URLs for inject command.
|
||||
pref("devtools.gcli.jquerySrc", "https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.1/jquery.min.js");
|
||||
pref("devtools.gcli.lodashSrc", "https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.6.1/lodash.min.js");
|
||||
pref("devtools.gcli.underscoreSrc", "https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js");
|
||||
|
||||
// Set imgur upload client ID
|
||||
pref("devtools.gcli.imgurClientID", '0df414e888d7240');
|
||||
// Imgur's upload URL
|
||||
pref("devtools.gcli.imgurUploadURL", "https://api.imgur.com/3/image");
|
||||
|
||||
// GCLI commands directory
|
||||
pref("devtools.commands.dir", "");
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
#include ../../security/manager/ssl/security-prefs.js
|
||||
#include init/all.js
|
||||
#include ../../devtools/shared/preferences/devtools-shared.js
|
||||
#ifdef MOZ_DATA_REPORTING
|
||||
#include ../../toolkit/components/telemetry/datareporting-prefs.js
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1077,92 +1077,16 @@ pref("toolkit.asyncshutdown.crash_timeout", 180000); // 3 minutes
|
|||
// Extra logging for AsyncShutdown barriers and phases
|
||||
pref("toolkit.asyncshutdown.log", false);
|
||||
|
||||
// Tells if DevTools have been explicitely enabled by the user.
|
||||
// This pref allows to disable all features related to DevTools
|
||||
// for users that never use them.
|
||||
// Until bug 1361080 lands, we always consider them enabled.
|
||||
pref("devtools.enabled", true);
|
||||
|
||||
// Enable deprecation warnings.
|
||||
pref("devtools.errorconsole.deprecation_warnings", true);
|
||||
|
||||
#ifdef NIGHTLY_BUILD
|
||||
// Don't show the Browser Toolbox prompt on local builds / nightly
|
||||
pref("devtools.debugger.prompt-connection", false, sticky);
|
||||
#else
|
||||
pref("devtools.debugger.prompt-connection", true, sticky);
|
||||
#endif
|
||||
|
||||
#ifdef MOZILLA_OFFICIAL
|
||||
// Disable debugging chrome
|
||||
pref("devtools.chrome.enabled", false, sticky);
|
||||
// Disable remote debugging connections
|
||||
pref("devtools.debugger.remote-enabled", false, sticky);
|
||||
// enable JS dump() function.
|
||||
pref("browser.dom.window.dump.enabled", false, sticky);
|
||||
#else
|
||||
// In local builds, enable the browser toolbox by default
|
||||
pref("devtools.chrome.enabled", true, sticky);
|
||||
pref("devtools.debugger.remote-enabled", true, sticky);
|
||||
pref("browser.dom.window.dump.enabled", true, sticky);
|
||||
#endif
|
||||
|
||||
|
||||
// Disable remote debugging protocol logging
|
||||
pref("devtools.debugger.log", false);
|
||||
pref("devtools.debugger.log.verbose", false);
|
||||
|
||||
pref("devtools.debugger.remote-port", 6000);
|
||||
pref("devtools.debugger.remote-websocket", false);
|
||||
// Force debugger server binding on the loopback interface
|
||||
pref("devtools.debugger.force-local", true);
|
||||
// Block tools from seeing / interacting with certified apps
|
||||
pref("devtools.debugger.forbid-certified-apps", true);
|
||||
|
||||
// Limit for intercepted response bodies (1 MB)
|
||||
// Possible values:
|
||||
// 0 => the response body has no limit
|
||||
// n => represents max number of bytes stored
|
||||
pref("devtools.netmonitor.responseBodyLimit", 1048576);
|
||||
|
||||
// DevTools default color unit
|
||||
pref("devtools.defaultColorUnit", "authored");
|
||||
|
||||
// Used for devtools debugging
|
||||
pref("devtools.dump.emit", false);
|
||||
|
||||
// Controls whether EventEmitter module throws dump message on each emit
|
||||
pref("toolkit.dump.emit", false);
|
||||
|
||||
// Disable device discovery logging
|
||||
pref("devtools.discovery.log", false);
|
||||
// Whether to scan for DevTools devices via WiFi
|
||||
pref("devtools.remote.wifi.scan", true);
|
||||
// Client must complete TLS handshake within this window (ms)
|
||||
pref("devtools.remote.tls-handshake-timeout", 10000);
|
||||
|
||||
// URL of the remote JSON catalog used for device simulation
|
||||
pref("devtools.devices.url", "https://code.cdn.mozilla.net/devices/devices.json");
|
||||
|
||||
// Display the introductory text
|
||||
pref("devtools.gcli.hideIntro", false);
|
||||
|
||||
// How eager are we to show help: never=1, sometimes=2, always=3
|
||||
pref("devtools.gcli.eagerHelper", 2);
|
||||
|
||||
// Alias to the script URLs for inject command.
|
||||
pref("devtools.gcli.jquerySrc", "https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.1/jquery.min.js");
|
||||
pref("devtools.gcli.lodashSrc", "https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.6.1/lodash.min.js");
|
||||
pref("devtools.gcli.underscoreSrc", "https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js");
|
||||
|
||||
// Set imgur upload client ID
|
||||
pref("devtools.gcli.imgurClientID", '0df414e888d7240');
|
||||
// Imgur's upload URL
|
||||
pref("devtools.gcli.imgurUploadURL", "https://api.imgur.com/3/image");
|
||||
|
||||
// GCLI commands directory
|
||||
pref("devtools.commands.dir", "");
|
||||
|
||||
// view source
|
||||
pref("view_source.syntax_highlight", true);
|
||||
pref("view_source.wrap_long_lines", false);
|
||||
|
|
|
|||
Loading…
Reference in a new issue