Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(523)

Unified Diff: third_party/WebKit/Source/core/inspector/protocol/Emulation.json

Issue 2035653005: DevTools: split protocol.json into files per domain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/inspector/protocol/Emulation.json
diff --git a/third_party/WebKit/Source/core/inspector/protocol/Emulation.json b/third_party/WebKit/Source/core/inspector/protocol/Emulation.json
new file mode 100644
index 0000000000000000000000000000000000000000..b1880698dbeb2bbafe92f5680a2b6986c52c7326
--- /dev/null
+++ b/third_party/WebKit/Source/core/inspector/protocol/Emulation.json
@@ -0,0 +1,246 @@
+{
+ "domain": "Emulation",
+ "version": {
+ "major": "1",
+ "minor": "1"
+ },
+ "description": "This domain emulates different environments for the page.",
+ "hidden": true,
+ "types": [
+ {
+ "id": "ScreenOrientation",
+ "type": "object",
+ "description": "Screen orientation.",
+ "properties": [
+ {
+ "name": "type",
+ "type": "string",
+ "enum": [
+ "portraitPrimary",
+ "portraitSecondary",
+ "landscapePrimary",
+ "landscapeSecondary"
+ ],
+ "description": "Orientation type."
+ },
+ {
+ "name": "angle",
+ "type": "integer",
+ "description": "Orientation angle."
+ }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "setDeviceMetricsOverride",
+ "description": "Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results).",
+ "parameters": [
+ {
+ "name": "width",
+ "type": "integer",
+ "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override."
+ },
+ {
+ "name": "height",
+ "type": "integer",
+ "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override."
+ },
+ {
+ "name": "deviceScaleFactor",
+ "type": "number",
+ "description": "Overriding device scale factor value. 0 disables the override."
+ },
+ {
+ "name": "mobile",
+ "type": "boolean",
+ "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more."
+ },
+ {
+ "name": "fitWindow",
+ "type": "boolean",
+ "description": "Whether a view that exceeds the available browser window area should be scaled down to fit."
+ },
+ {
+ "name": "scale",
+ "type": "number",
+ "optional": true,
+ "description": "Scale to apply to resulting view image. Ignored in |fitWindow| mode."
+ },
+ {
+ "name": "offsetX",
+ "type": "number",
+ "optional": true,
+ "description": "X offset to shift resulting view image by. Ignored in |fitWindow| mode."
+ },
+ {
+ "name": "offsetY",
+ "type": "number",
+ "optional": true,
+ "description": "Y offset to shift resulting view image by. Ignored in |fitWindow| mode."
+ },
+ {
+ "name": "screenWidth",
+ "type": "integer",
+ "optional": true,
+ "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|."
+ },
+ {
+ "name": "screenHeight",
+ "type": "integer",
+ "optional": true,
+ "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|."
+ },
+ {
+ "name": "positionX",
+ "type": "integer",
+ "optional": true,
+ "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|."
+ },
+ {
+ "name": "positionY",
+ "type": "integer",
+ "optional": true,
+ "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|."
+ },
+ {
+ "name": "screenOrientation",
+ "$ref": "ScreenOrientation",
+ "optional": true,
+ "description": "Screen orientation override."
+ }
+ ],
+ "handlers": [
+ "browser"
+ ]
+ },
+ {
+ "name": "clearDeviceMetricsOverride",
+ "description": "Clears the overriden device metrics.",
+ "handlers": [
+ "browser"
+ ]
+ },
+ {
+ "name": "resetPageScaleFactor",
+ "description": "Requests that page scale factor is reset to initial values."
+ },
+ {
+ "name": "setPageScaleFactor",
+ "description": "Sets a specified page scale factor.",
+ "parameters": [
+ {
+ "name": "pageScaleFactor",
+ "type": "number",
+ "description": "Page scale factor."
+ }
+ ]
+ },
+ {
+ "name": "setScriptExecutionDisabled",
+ "description": "Switches script execution in the page.",
+ "parameters": [
+ {
+ "name": "value",
+ "type": "boolean",
+ "description": "Whether script execution should be disabled in the page."
+ }
+ ]
+ },
+ {
+ "name": "setGeolocationOverride",
+ "description": "Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.",
+ "parameters": [
+ {
+ "name": "latitude",
+ "type": "number",
+ "optional": true,
+ "description": "Mock latitude"
+ },
+ {
+ "name": "longitude",
+ "type": "number",
+ "optional": true,
+ "description": "Mock longitude"
+ },
+ {
+ "name": "accuracy",
+ "type": "number",
+ "optional": true,
+ "description": "Mock accuracy"
+ }
+ ],
+ "handlers": [
+ "browser"
+ ]
+ },
+ {
+ "name": "clearGeolocationOverride",
+ "description": "Clears the overriden Geolocation Position and Error.",
+ "handlers": [
+ "browser"
+ ]
+ },
+ {
+ "name": "setTouchEmulationEnabled",
+ "parameters": [
+ {
+ "name": "enabled",
+ "type": "boolean",
+ "description": "Whether the touch event emulation should be enabled."
+ },
+ {
+ "name": "configuration",
+ "type": "string",
+ "enum": [
+ "mobile",
+ "desktop"
+ ],
+ "optional": true,
+ "description": "Touch/gesture events configuration. Default: current platform."
+ }
+ ],
+ "description": "Toggles mouse event-based touch event emulation.",
+ "handlers": [
+ "browser",
+ "renderer"
+ ]
+ },
+ {
+ "name": "setEmulatedMedia",
+ "parameters": [
+ {
+ "name": "media",
+ "type": "string",
+ "description": "Media type to emulate. Empty string disables the override."
+ }
+ ],
+ "description": "Emulates the given media for CSS media queries."
+ },
+ {
+ "name": "setCPUThrottlingRate",
+ "parameters": [
+ {
+ "name": "rate",
+ "type": "number",
+ "description": "Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc)."
+ }
+ ],
+ "description": "Enables CPU throttling to emulate slow CPUs."
+ },
+ {
+ "name": "canEmulate",
+ "description": "Tells whether emulation is supported.",
+ "returns": [
+ {
+ "name": "result",
+ "type": "boolean",
+ "description": "True if emulation is supported."
+ }
+ ],
+ "handlers": [
+ "browser"
+ ]
+ }
+ ]
+}

Powered by Google App Engine
This is Rietveld 408576698