Index: third_party/WebKit/Source/core/inspector/browser_protocol.json |
diff --git a/third_party/WebKit/Source/core/inspector/browser_protocol.json b/third_party/WebKit/Source/core/inspector/browser_protocol.json |
index 6527abc46147dfce17a799ed161709ebaff09425..11b6a425aa10a013b6243ff052a49ccd5ec83b16 100644 |
--- a/third_party/WebKit/Source/core/inspector/browser_protocol.json |
+++ b/third_party/WebKit/Source/core/inspector/browser_protocol.json |
@@ -3416,7 +3416,7 @@ |
"name": "sendMessageToTarget", |
"description": "Sends protocol message to the target with given id.", |
"parameters": [ |
- { "name": "targetId", "type": "string" }, |
+ { "name": "targetId", "$ref": "TargetID" }, |
{ "name": "message", "type": "string" } |
] |
}, |
@@ -4551,5 +4551,65 @@ |
] |
} |
] |
+ }, |
+ { |
+ "domain": "Browser", |
+ "description": "The Browser domain defines methods and events for browser managing.", |
+ "experimental": true, |
+ "types": [ |
+ { |
+ "id": "WindowID", |
+ "type": "integer" |
+ }, |
+ { |
+ "id": "WindowState", |
+ "type": "string", |
+ "enum": ["normal", "minimized", "maximized", "fullscreen"], |
+ "description": "The state of the browser window." |
+ }, |
+ { |
+ "id": "Bounds", |
+ "type": "object", |
+ "description": "Browser window bounds information", |
+ "properties": [ |
+ { "name": "left", "type": "integer", "optional": true, "description": "The offset from the left edge of the screen to the window in pixels."}, |
+ { "name": "top", "type": "integer", "optional": true, "description": "The offset from the top edge of the screen to the window in pixels."}, |
+ { "name": "width", "type": "integer", "optional": true, "description": "The window width in pixels."}, |
+ { "name": "height", "type": "integer", "optional": true, "description": "The window height in pixels."}, |
+ { "name": "windowState", "$ref": "WindowState", "optional": true, "description": "The window state. Default to normal."} |
+ ] |
+ } |
+ ], |
+ "commands": [ |
+ { |
+ "name": "getWindowForTarget", |
+ "description": "Get the browser window that contains the devtools target.", |
+ "parameters": [ |
+ { "name": "targetId", "$ref": "Target.TargetID", "description": "Devtools agent host id." } |
+ ], |
+ "returns": [ |
+ { "name": "windowId", "$ref": "WindowID", "description": "Browser window id." }, |
+ { "name": "bounds", "$ref": "Bounds", "description": "Bounds information of the window." } |
+ ] |
+ }, |
+ { |
+ "name": "setWindowBounds", |
+ "description": "Set position and/or size of the browser window.", |
+ "parameters": [ |
+ { "name": "windowId", "$ref": "WindowID", "description": "Browser window id." }, |
+ { "name": "bounds", "$ref": "Bounds", "description": "New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'." } |
dgozman
2017/03/22 21:28:34
... Leaves unspecified fields unchanged.
jzfeng
2017/03/23 06:58:25
Done.
|
+ ] |
+ }, |
+ { |
+ "name": "getWindowBounds", |
+ "description": "Get position and size of the browser window.", |
+ "parameters": [ |
+ { "name": "windowId", "$ref": "WindowID", "description": "Browser window id." } |
+ ], |
+ "returns": [ |
+ { "name": "bounds", "$ref": "Bounds", "description": "Bounds information of the window." } |
+ ] |
+ } |
+ ] |
}] |
} |