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

Side by Side Diff: third_party/WebKit/Source/core/inspector/browser_protocol.json

Issue 2829973002: add customized printing setting for headless (Closed)
Patch Set: nit change Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 { 1 {
2 "version": { "major": "1", "minor": "2" }, 2 "version": { "major": "1", "minor": "2" },
3 "domains": [{ 3 "domains": [{
4 "domain": "Inspector", 4 "domain": "Inspector",
5 "experimental": true, 5 "experimental": true,
6 "types": [], 6 "types": [],
7 "commands": [ 7 "commands": [
8 { 8 {
9 "name": "enable", 9 "name": "enable",
10 "description": "Enables inspector domain notifications." 10 "description": "Enables inspector domain notifications."
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 { "name": "fromSurface", "type": "boolean", "optional": true , "description": "Capture the screenshot from the surface, rather than the view. Defaults to false.", "experimental": true } 423 { "name": "fromSurface", "type": "boolean", "optional": true , "description": "Capture the screenshot from the surface, rather than the view. Defaults to false.", "experimental": true }
424 ], 424 ],
425 "returns": [ 425 "returns": [
426 { "name": "data", "type": "string", "description": "Base64-e ncoded image data." } 426 { "name": "data", "type": "string", "description": "Base64-e ncoded image data." }
427 ], 427 ],
428 "experimental": true 428 "experimental": true
429 }, 429 },
430 { 430 {
431 "name": "printToPDF", 431 "name": "printToPDF",
432 "description": "Print page as pdf.", 432 "description": "Print page as pdf.",
433 "parameters": [
434 {"name": "dpi", "type": "integer", "optional": true, "descri ption": "DPI of the printed file."},
Eric Seckler 2017/04/20 09:15:28 what's the default value? also, this doesn't seem
jzfeng 2017/04/27 06:56:07 Removed this parameter, because it is not well sup
435 {"name": "landscape", "type": "boolean", "optional": true, " description": "Paper orientation. Defaults to false."},
436 {"name": "displayHeaderFooter", "type": "boolean", "optional ": true, "description": "Display header and footer. Defaults to false."},
437 {"name": "printBackgrounds", "type": "boolean", "optional": true, "description": "Print background graphics. Defaults to false."},
Eric Seckler 2017/04/20 09:15:28 nit: colors/graphics
jzfeng 2017/04/27 06:56:07 Done.
438 {"name": "scale", "type": "number", "optional": true, "descr iption": "Scale of the pdf. Defaults to 1."},
439 {"name": "paperType", "type": "string", "optional": true, "e num": ["letter", "legal", "A4", "A3"], "description": "Paper type. Defaults to ' letter'."},
Eric Seckler 2017/04/20 09:15:28 Are these all the paper sizes we can support? Mayb
Lei Zhang 2017/04/20 19:08:59 That's a product decision. If you go with only mm
martinsb 2017/04/26 08:10:00 Thank you very much for your efforts, I have no do
jzfeng 2017/04/27 06:56:07 Add a new "CUSTOM" page type to let the user speci
Eric Seckler 2017/04/27 08:57:00 For my taste, this is more complicated than it nee
jzfeng 2017/05/02 07:50:55 Sounds good. Done.
440 {"name": "marginType", "type": "string", "optional": true, " enum": ["defaultMargin", "noMargin", "customMargin"], "description": "Margin typ e. Set to 'customMargin' to customize margin."},
Eric Seckler 2017/04/20 09:15:28 I'm not sure we need this field. I'd propose we ge
jzfeng 2017/04/27 06:56:07 Sounds good. Done.
441 {"name": "marginTop", "type": "number", "optional": true, "d escription": "Top margin in inch. Set when margin type is 'custom'."},
442 {"name": "marginBottom", "type": "number", "optional": true, "description": "Bottom margin in inch. Set when margin type is 'custom'."},
443 {"name": "marginLeft", "type": "number", "optional": true, " description": "Left margin in inch. Set when margin type is 'custom'."},
444 {"name": "marginRight", "type": "number", "optional": true, "description": "Right margin in inch. Set when margin type is 'custom'."},
445 {"name": "pageRanges", "type": "string", "optional": true, " description": "Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to print a ll pages."}
446 ],
433 "returns": [ 447 "returns": [
434 { "name": "data", "type": "string", "description": "Base64-e ncoded pdf data." } 448 { "name": "data", "type": "string", "description": "Base64-e ncoded pdf data." }
435 ], 449 ],
436 "experimental": true 450 "experimental": true
437 }, 451 },
438 { 452 {
439 "name": "startScreencast", 453 "name": "startScreencast",
440 "description": "Starts sending each frame using the <code>screen castFrame</code> event.", 454 "description": "Starts sending each frame using the <code>screen castFrame</code> event.",
441 "parameters": [ 455 "parameters": [
442 { "name": "format", "type": "string", "optional": true, "enu m": ["jpeg", "png"], "description": "Image compression format." }, 456 { "name": "format", "type": "string", "optional": true, "enu m": ["jpeg", "png"], "description": "Image compression format." },
(...skipping 4181 matching lines...) Expand 10 before | Expand all | Expand 10 after
4624 "parameters": [ 4638 "parameters": [
4625 { "name": "windowId", "$ref": "WindowID", "description": "Br owser window id." } 4639 { "name": "windowId", "$ref": "WindowID", "description": "Br owser window id." }
4626 ], 4640 ],
4627 "returns": [ 4641 "returns": [
4628 { "name": "bounds", "$ref": "Bounds", "description": "Bounds information of the window. When window state is 'minimized', the restored windo w position and size are returned." } 4642 { "name": "bounds", "$ref": "Bounds", "description": "Bounds information of the window. When window state is 'minimized', the restored windo w position and size are returned." }
4629 ] 4643 ]
4630 } 4644 }
4631 ] 4645 ]
4632 }] 4646 }]
4633 } 4647 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698