fune/devtools/shared/specs/target-configuration.js
Kris Maglione ae436f55ec Bug 1646560: Part 2 - Move allowJavascript and friends from DocShell to BrowsingContext and WindowContext. r=jdescottes,nika,geckoview-reviewers,devtools-backward-compat-reviewers,agi
This is slightly complicated by the fact that the editor code wants to be able
to set this from the content process, so we really need separate
BrowsingContext and WindowContext flags, the latter of which can be set by the
owning process.

Differential Revision: https://phabricator.services.mozilla.com/D114899
2021-06-15 04:40:11 +00:00

50 lines
1.4 KiB
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 {
generateActorSpec,
Arg,
RetVal,
types,
} = require("devtools/shared/protocol");
types.addDictType("target-configuration.configuration", {
cacheDisabled: "nullable:boolean",
colorSchemeSimulation: "nullable:string",
customUserAgent: "nullable:string",
javascriptEnabled: "nullable:boolean",
overrideDPPX: "nullable:number",
paintFlashing: "nullable:boolean",
printSimulationEnabled: "nullable:boolean",
rdmPaneOrientation: "nullable:json",
reloadOnTouchSimulationToggle: "nullable:boolean",
restoreFocus: "nullable:boolean",
serviceWorkersTestingEnabled: "nullable:boolean",
touchEventsOverride: "nullable:string",
});
const targetConfigurationSpec = generateActorSpec({
typeName: "target-configuration",
methods: {
updateConfiguration: {
request: {
configuration: Arg(0, "target-configuration.configuration"),
},
response: {
configuration: RetVal("target-configuration.configuration"),
},
},
isJavascriptEnabled: {
request: {},
response: {
javascriptEnabled: RetVal("boolean"),
},
},
},
});
exports.targetConfigurationSpec = targetConfigurationSpec;