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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.h

Issue 12022002: Fixing activation states from the new launcher. Also adding a whole bunch of unit tests for the new… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed problem with ASAN unittest Created 7 years, 11 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/ash/launcher/chrome_launcher_controller_per_app.h
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.h b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.h
index bfae61f62cf29fa79dde8e83fa1ac729b2458d2c..b463bdb036a674abb098e69e8f972eb333f4d124 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.h
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.h
@@ -25,6 +25,7 @@
#include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
#include "chrome/browser/ui/ash/launcher/shell_window_launcher_controller.h"
+#include "chrome/browser/ui/browser_list_observer.h"
#include "chrome/browser/ui/extensions/extension_enable_flow_delegate.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -65,7 +66,8 @@ class ChromeLauncherControllerPerApp : public ash::LauncherModelObserver,
public content::NotificationObserver,
public PrefServiceSyncableObserver,
public AppSyncUIStateObserver,
- public ExtensionEnableFlowDelegate {
+ public ExtensionEnableFlowDelegate,
+ public chrome::BrowserListObserver {
public:
ChromeLauncherControllerPerApp(Profile* profile, ash::LauncherModel* model);
virtual ~ChromeLauncherControllerPerApp();
@@ -295,6 +297,9 @@ class ChromeLauncherControllerPerApp : public ash::LauncherModelObserver,
// Note that for incognito windows the incognito icon will be returned.
gfx::Image GetAppListIcon(content::WebContents* web_contents) const;
+ // Overridden from chrome::BrowserListObserver.
+ virtual void OnBrowserRemoved(Browser* browser) OVERRIDE;
+
protected:
// ChromeLauncherController overrides:
@@ -314,6 +319,9 @@ class ChromeLauncherControllerPerApp : public ash::LauncherModelObserver,
private:
friend class ChromeLauncherControllerPerAppTest;
+ // Updates the activation state of the Broswer item.
+ void UpdateBrowserItemStatus();
+
typedef std::map<ash::LauncherID, LauncherItemController*>
IDToItemControllerMap;
typedef std::list<content::WebContents*> WebContentsList;

Powered by Google App Engine
This is Rietveld 408576698