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

Unified Diff: chrome/common/extensions/api/extension_api.json

Issue 1527015: Support PNG and quality control in chrome.tabs.captureVisibleTab(). (Closed)
Patch Set: Rebase for checkin. Created 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/extension_api.json
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json
index 6512c6d17eaf813e441901f01ca3884d0a7469f7..30b3f124bae6bcc9baa740cc22b4b95fabc83034 100755
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -979,8 +979,30 @@
"description": "The target window. Defaults to the <a href='windows.html#current-window'>current window</a>."
},
{
+ "type": "object",
+ "name": "options",
+ "optional": true,
+ "description": "Set parameters of image capture, such as the format of the resulting image. This parameter was added in version 5.0 . Earlier versions of chrome will throw an exception unless you omit it.",
+ "properties": {
+ "format": {
+ "type": "string",
+ "optional": true,
+ "enum": ["jpeg", "png"],
+ "description": "The format of the resulting image. Default is jpeg."
+ },
+ "quality": {
+ "type": "integer",
+ "name": "quality",
+ "optional": true,
+ "minimum": 0,
+ "maximum": 100,
+ "description": "When format is 'jpeg', controls the quality of the resulting image. This value is ignored for PNG images. As quality is decreased, the resulting image will have more visual artifacts, and the number of bytes needed to store it will decrease."
+ }
+ }
+ },
+ {
"type": "function", "name": "callback", "parameters": [
- {"type": "string", "name": "dataUrl", "description": "A data URL of a JPEG encoding of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display."}
+ {"type": "string", "name": "dataUrl", "description": "A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display."}
]
}
]
« no previous file with comments | « chrome/browser/extensions/extension_tabs_module_constants.cc ('k') | chrome/common/extensions/docs/tabs.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698