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

Unified Diff: chrome/browser/extensions/api/tabs/tabs_api.h

Issue 2153943002: Implementing TabManager extensions API Discard Function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reset protection time 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tabs/tabs_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/tabs/tabs_api.h
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.h b/chrome/browser/extensions/api/tabs/tabs_api.h
index 7457aad43d8c735c3904923a207cb3b18ffbee07..a895eb6a92c80fe54129f0bdaa52de386e57af7b 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.h
+++ b/chrome/browser/extensions/api/tabs/tabs_api.h
@@ -17,6 +17,7 @@
#include "content/public/browser/notification_registrar.h"
#include "extensions/browser/api/execute_code_function.h"
#include "extensions/browser/api/web_contents_capture_client.h"
+#include "extensions/browser/extension_function.h"
#include "extensions/common/extension_resource.h"
#include "extensions/common/user_script.h"
#include "url/gurl.h"
@@ -136,7 +137,7 @@ class TabsHighlightFunction : public ChromeSyncExtensionFunction {
bool RunSync() override;
bool HighlightTab(TabStripModel* tabstrip,
ui::ListSelectionModel* selection,
- int *active_index,
+ int* active_index,
int index);
DECLARE_EXTENSION_FUNCTION("tabs.highlight", TABS_HIGHLIGHT)
};
@@ -322,6 +323,21 @@ class TabsGetZoomSettingsFunction : public ZoomAPIFunction {
DECLARE_EXTENSION_FUNCTION("tabs.getZoomSettings", TABS_GETZOOMSETTINGS)
};
+class TabsDiscardFunction : public UIThreadExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("tabs.discard", TABS_DISCARD)
+
+ TabsDiscardFunction();
+
+ private:
+ ~TabsDiscardFunction() override;
+
+ // ExtensionFunction:
+ ExtensionFunction::ResponseAction Run() override;
+
+ DISALLOW_COPY_AND_ASSIGN(TabsDiscardFunction);
+};
+
} // namespace extensions
#endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tabs/tabs_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698