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

Unified Diff: chrome/browser/ui/views/ash/launcher/launcher_updater.h

Issue 9689047: Added notion of currently active app / browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove default args from State Created 8 years, 9 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/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 2e0d4c2570d04bcd594dc91b274fb0a52dc25583..0bc061cff40a39dbaf5a499ff4a65fec4edb9924 100644
--- a/chrome/browser/ui/views/ash/launcher/launcher_updater.h
+++ b/chrome/browser/ui/views/ash/launcher/launcher_updater.h
@@ -32,6 +32,26 @@ class Window;
// window up to date as the tab strip changes.
class LauncherUpdater : public TabStripModelObserver {
public:
+ // This API is to be used as part of testing only.
+ class TestApi {
sky 2012/03/13 17:14:42 I hate seeing the first public thing in a class a
DaveMoore 2012/03/13 23:33:56 I understand the issue about it being the first th
+ public:
+ 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,
@@ -61,6 +81,7 @@ class LauncherUpdater : public TabStripModelObserver {
TabContentsWrapper* GetTab(ash::LauncherID id);
// TabStripModel overrides:
+ void ActivationChanged(TabContentsWrapper* tab, bool active);
sky 2012/03/13 17:14:42 Don't group this with TabStripModel overrides. Al
DaveMoore 2012/03/13 23:33:56 Done.
virtual void ActiveTabChanged(TabContentsWrapper* old_contents,
TabContentsWrapper* new_contents,
int index,
@@ -120,6 +141,10 @@ 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);
+
ash::LauncherModel* launcher_model();
// Browser window we're in.

Powered by Google App Engine
This is Rietveld 408576698