зеркало из https://github.com/mozilla/gecko-dev.git
bug 1526364: browser, marionette: use "remote-listening" to indicate remote control; r=Gijs,marionette-reviewers,remote-protocol-reviewers,maja_zf
This changes the event Marionette emits when it is running from "remote-active" to "remote-listening". The background for this change is that the forthcoming Chromium-based remote protocol uses the same observer notification to indicate when it listens for browser-external connections. This means that with this change, the visual hint presented to the user will also be applied when the remote agent starts its HTTPD listener. Unlike Marionette however, the remote debugging protocol may be used for browser-internal applications and it is not appropriate to signal that the browser is under remote control under those circumstances, hence the naming change away from "active". Differential Revision: https://phabricator.services.mozilla.com/D54269 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
b1c82e8668
Коммит
b749854d09
|
@ -1951,7 +1951,7 @@ var gBrowserInit = {
|
|||
this._handleURIToLoad();
|
||||
|
||||
Services.obs.addObserver(gIdentityHandler, "perm-changed");
|
||||
Services.obs.addObserver(gRemoteControl, "remote-active");
|
||||
Services.obs.addObserver(gRemoteControl, "remote-listening");
|
||||
Services.obs.addObserver(
|
||||
gSessionHistoryObserver,
|
||||
"browser:purge-session-history"
|
||||
|
@ -2484,7 +2484,7 @@ var gBrowserInit = {
|
|||
FullZoom.destroy();
|
||||
|
||||
Services.obs.removeObserver(gIdentityHandler, "perm-changed");
|
||||
Services.obs.removeObserver(gRemoteControl, "remote-active");
|
||||
Services.obs.removeObserver(gRemoteControl, "remote-listening");
|
||||
Services.obs.removeObserver(
|
||||
gSessionHistoryObserver,
|
||||
"browser:purge-session-history"
|
||||
|
|
|
@ -32,7 +32,7 @@ XPCOMUtils.defineLazyServiceGetter(
|
|||
const XMLURI_PARSE_ERROR =
|
||||
"http://www.mozilla.org/newlayout/xml/parsererror.xml";
|
||||
|
||||
const NOTIFY_RUNNING = "remote-active";
|
||||
const NOTIFY_LISTENING = "remote-listening";
|
||||
|
||||
// Complements -marionette flag for starting the Marionette server.
|
||||
// We also set this if Marionette is running in order to start the server
|
||||
|
@ -506,8 +506,8 @@ class MarionetteParentProcess {
|
|||
}
|
||||
|
||||
env.set(ENV_ENABLED, "1");
|
||||
Services.obs.notifyObservers(this, NOTIFY_RUNNING, true);
|
||||
log.debug("Remote service is active");
|
||||
Services.obs.notifyObservers(this, NOTIFY_LISTENING, true);
|
||||
log.debug("Marionette is listening");
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -520,8 +520,8 @@ class MarionetteParentProcess {
|
|||
|
||||
if (this.running) {
|
||||
this.server.stop();
|
||||
Services.obs.notifyObservers(this, NOTIFY_RUNNING);
|
||||
log.debug("Remote service is inactive");
|
||||
Services.obs.notifyObservers(this, NOTIFY_LISTENING);
|
||||
log.debug("Marionette stopped listening");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче