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

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

Issue 2142413003: Adding Discarded property support for onUpdate function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@API_Discarded
Patch Set: 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/browser/extensions/api/tabs/tabs_event_router.h
diff --git a/chrome/browser/extensions/api/tabs/tabs_event_router.h b/chrome/browser/extensions/api/tabs/tabs_event_router.h
index 5468d913ec73350a9cff7917a5d6c874132bbd87..6f691dc32d60a9eb02f97e6e939bf4f7a1999d09 100644
--- a/chrome/browser/extensions/api/tabs/tabs_event_router.h
+++ b/chrome/browser/extensions/api/tabs/tabs_event_router.h
@@ -12,6 +12,7 @@
#include "base/macros.h"
#include "base/scoped_observer.h"
#include "chrome/browser/extensions/api/tabs/tabs_api.h"
+#include "chrome/browser/memory/tab_manager_observer.h"
#include "chrome/browser/ui/browser_list_observer.h"
#include "chrome/browser/ui/browser_tab_strip_tracker.h"
#include "chrome/browser/ui/browser_tab_strip_tracker_delegate.h"
@@ -39,7 +40,8 @@ class TabsEventRouter : public TabStripModelObserver,
public BrowserTabStripTrackerDelegate,
public chrome::BrowserListObserver,
public favicon::FaviconDriverObserver,
- public zoom::ZoomObserver {
+ public zoom::ZoomObserver,
+ public memory::TabManagerObserver {
public:
explicit TabsEventRouter(Profile* profile);
~TabsEventRouter() override;
@@ -88,6 +90,10 @@ class TabsEventRouter : public TabStripModelObserver,
bool icon_url_changed,
const gfx::Image& image) override;
+ // TabManagerObserver
+ void OnDiscardedStateChange(content::WebContents* contents,
Georges Khalil 2016/07/13 15:52:10 nit: memory::TabManagerObserver:
Anderson Silva 2016/07/14 15:13:13 Done.
+ bool is_discarded) override;
+
private:
// "Synthetic" event. Called from TabInsertedAt if new tab is detected.
void TabCreatedAt(content::WebContents* contents, int index, bool active);

Powered by Google App Engine
This is Rietveld 408576698