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

Side by Side 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: Forgotten to add file to repository 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_APP_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_APP_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_APP_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_APP_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 // Sets the AppTabHelper/AppIconLoader, taking ownership of the helper class. 300 // Sets the AppTabHelper/AppIconLoader, taking ownership of the helper class.
301 // These are intended for testing. 301 // These are intended for testing.
302 virtual void SetAppTabHelperForTest(AppTabHelper* helper) OVERRIDE; 302 virtual void SetAppTabHelperForTest(AppTabHelper* helper) OVERRIDE;
303 virtual void SetAppIconLoaderForTest(AppIconLoader* loader) OVERRIDE; 303 virtual void SetAppIconLoaderForTest(AppIconLoader* loader) OVERRIDE;
304 virtual const std::string& GetAppIdFromLauncherIdForTest( 304 virtual const std::string& GetAppIdFromLauncherIdForTest(
305 ash::LauncherID id) OVERRIDE; 305 ash::LauncherID id) OVERRIDE;
306 306
307 private: 307 private:
308 friend class ChromeLauncherControllerPerAppTest; 308 friend class ChromeLauncherControllerPerAppTest;
309 309
310 // Updates the activation state of the Broswer item.
311 void UpdateBrowserItemStatus();
312
313 // Checks if there is at least one browser which is not in progress of
314 // shutting down.
315 bool BrowserIsRunning();
316
310 typedef std::map<ash::LauncherID, LauncherItemController*> 317 typedef std::map<ash::LauncherID, LauncherItemController*>
311 IDToItemControllerMap; 318 IDToItemControllerMap;
312 typedef std::list<content::WebContents*> WebContentsList; 319 typedef std::list<content::WebContents*> WebContentsList;
313 typedef std::map<std::string, WebContentsList> AppIDToWebContentsListMap; 320 typedef std::map<std::string, WebContentsList> AppIDToWebContentsListMap;
314 typedef std::map<content::WebContents*, std::string> WebContentsToAppIDMap; 321 typedef std::map<content::WebContents*, std::string> WebContentsToAppIDMap;
315 322
316 // Returns the profile used for new windows. 323 // Returns the profile used for new windows.
317 Profile* GetProfileForNewWindows(); 324 Profile* GetProfileForNewWindows();
318 325
319 // Invoked when the associated browser or app is closed. 326 // Invoked when the associated browser or app is closed.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 content::NotificationRegistrar notification_registrar_; 392 content::NotificationRegistrar notification_registrar_;
386 393
387 PrefChangeRegistrar pref_change_registrar_; 394 PrefChangeRegistrar pref_change_registrar_;
388 395
389 AppSyncUIState* app_sync_ui_state_; 396 AppSyncUIState* app_sync_ui_state_;
390 397
391 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerPerApp); 398 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerPerApp);
392 }; 399 };
393 400
394 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_APP_H_ 401 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_APP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698