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..bae63dcdfe2d20c568907ef1b16372075a6f0a67 100644 |
--- a/chrome/browser/extensions/api/tabs/tabs_event_router.h |
+++ b/chrome/browser/extensions/api/tabs/tabs_event_router.h |
@@ -12,6 +12,8 @@ |
#include "base/macros.h" |
#include "base/scoped_observer.h" |
#include "chrome/browser/extensions/api/tabs/tabs_api.h" |
+#include "chrome/browser/memory/tab_manager.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 +41,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 +91,10 @@ class TabsEventRouter : public TabStripModelObserver, |
bool icon_url_changed, |
const gfx::Image& image) override; |
+ // memory::TabManagerObserver: |
+ void OnDiscardedStateChange(content::WebContents* contents, |
+ bool is_discarded) override; |
+ |
private: |
// "Synthetic" event. Called from TabInsertedAt if new tab is detected. |
void TabCreatedAt(content::WebContents* contents, int index, bool active); |
@@ -196,6 +203,9 @@ class TabsEventRouter : public TabStripModelObserver, |
BrowserTabStripTracker browser_tab_strip_tracker_; |
+ ScopedObserver<memory::TabManager, TabsEventRouter> |
+ tab_manager_scoped_observer_; |
+ |
DISALLOW_COPY_AND_ASSIGN(TabsEventRouter); |
}; |