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

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

Issue 2153943002: Implementing TabManager extensions API Discard Function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changed returned tab to optional plus tests Created 4 years, 5 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/tabs.json
diff --git a/chrome/common/extensions/api/tabs.json b/chrome/common/extensions/api/tabs.json
index 637f3c0d3a385459ffd13c96c677085820b0d783..442cd05f84e948289579379d5a74762f88462684 100644
--- a/chrome/common/extensions/api/tabs.json
+++ b/chrome/common/extensions/api/tabs.json
@@ -907,6 +907,34 @@
]
}
]
+ },
+ {
+ "name": "discard",
+ "type": "function",
+ "description": "Discards a tab from memory. Discarded tabs are still visible on the tab strip and are reloaded when activated.",
+ "parameters": [
+ {
+ "type": "integer",
+ "name": "tabId",
+ "optional": true,
+ "minimum": 0,
+ "description": "The ID of the tab to be discarded; defaults to the least important tab."
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "description": "Called after the operation is completed.",
+ "parameters": [
+ {
+ "name": "tab",
+ "$ref": "Tab",
+ "optional": true,
+ "description": "Discarded tab if it was successfully discarded. Undefined otherwise."
+ }
+ ]
+ }
+ ]
}
],
"events": [

Powered by Google App Engine
This is Rietveld 408576698