Index: chrome/browser/ui/views/ash/launcher/launcher_updater.h |
diff --git a/chrome/browser/ui/views/ash/launcher/launcher_updater.h b/chrome/browser/ui/views/ash/launcher/launcher_updater.h |
index 72e1c23efb93b91356aee06efd11a980b41554f2..bb1287a940a58949c7f6827e6aca014aba11f5bc 100644 |
--- a/chrome/browser/ui/views/ash/launcher/launcher_updater.h |
+++ b/chrome/browser/ui/views/ash/launcher/launcher_updater.h |
@@ -35,6 +35,26 @@ class Window; |
class LauncherUpdater : public TabStripModelObserver, |
public LauncherFaviconLoader::Delegate { |
public: |
+ // This API is to be used as part of testing only. |
+ class TestApi { |
+ public: |
+ explicit TestApi(LauncherUpdater* launcher_updater) |
+ : launcher_updater_(launcher_updater) {} |
+ virtual ~TestApi() {} |
+ |
+ // Returns the launcher id for |tab| if it's an app otherwise returns the |
+ // id for the browser itself. |
+ ash::LauncherID GetLauncherID(TabContentsWrapper* tab) { |
+ return launcher_updater_->GetLauncherID(tab); |
+ } |
+ |
+ // Returns the launcher id for the browser window. |
+ ash::LauncherID item_id() const { return launcher_updater_->item_id_; } |
+ |
+ private: |
+ LauncherUpdater* launcher_updater_; |
+ }; |
+ |
enum Type { |
TYPE_APP, |
TYPE_PANEL, |
@@ -68,6 +88,12 @@ class LauncherUpdater : public TabStripModelObserver, |
} |
// TabStripModelObserver overrides: |
+ void ActivationChanged(TabContentsWrapper* tab, bool active); |
+ // Call to indicate that the window the tabcontents are in has changed its |
+ // activation state. |
+ void BrowserActivationStateChanged(); |
+ |
+ // TabStripModel overrides: |
virtual void ActiveTabChanged(TabContentsWrapper* old_contents, |
TabContentsWrapper* new_contents, |
int index, |
@@ -130,6 +156,13 @@ class LauncherUpdater : public TabStripModelObserver, |
// |tab| is set to the TabContentsWrapper for the app tab. |
bool ContainsID(ash::LauncherID id, TabContentsWrapper** tab); |
+ // Returns the launcher id for |tab| if it's an app otherwise returns the |
+ // id for the browser itself. |
+ ash::LauncherID GetLauncherID(TabContentsWrapper* tab); |
+ |
+ // Retrieves the running status of |tab|. |
+ ash::LauncherItemStatus GetStatusForTab(TabContentsWrapper* tab); |
+ |
ash::LauncherModel* launcher_model(); |
// Browser window we're in. |