fune/devtools/shared/specs/responsive.js
Alexandre Poirot 6340009cb3 Bug 1721592 - [devtools] Remove old server codebase to listen to network events. r=devtools-reviewers,devtools-backward-compat-reviewers,jdescottes
With the removal of the old non-fission browser toolbox,
we removed the last usage of this old codebase.
We used to be able to listen to network events via WebConsole's actor's startListeners method.
Nowadays we should rather use the Watcher actor's watchResources method and listen to
NETWORK_EVENT resource.
(or migrate to WebDriver Bidi which will soon allow to listen to network requests see bug 1790369)

This patch also removed all now unused block* requests from webconsole actor,

Differential Revision: https://phabricator.services.mozilla.com/D165603
2023-01-04 18:27:21 +00:00

40 lines
858 B
JavaScript

/* 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/. */
"use strict";
const {
Arg,
RetVal,
generateActorSpec,
} = require("resource://devtools/shared/protocol.js");
const responsiveSpec = generateActorSpec({
typeName: "responsive",
methods: {
toggleTouchSimulator: {
request: {
options: Arg(0, "json"),
},
response: {
valueChanged: RetVal("boolean"),
},
},
setElementPickerState: {
request: {
state: Arg(0, "boolean"),
pickerType: Arg(1, "string"),
},
response: {},
},
dispatchOrientationChangeEvent: {
request: {},
response: {},
},
},
});
exports.responsiveSpec = responsiveSpec;