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

Unified Diff: chrome/browser/ui/browser_list.h

Issue 2108933003: Reorder browser list on workspace switch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set a browser as last active on workspace change Created 4 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/ui/browser_list.cc » ('j') | chrome/browser/ui/browser_list.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_list.h
diff --git a/chrome/browser/ui/browser_list.h b/chrome/browser/ui/browser_list.h
index 19ffaba1b1a12823e86f80566639b3f59965c185..68e0a7b79845d6fdd7061627737e288c00f456fa 100644
--- a/chrome/browser/ui/browser_list.h
+++ b/chrome/browser/ui/browser_list.h
@@ -12,6 +12,7 @@
#include "base/lazy_instance.h"
#include "base/macros.h"
#include "base/observer_list.h"
+#include "ui/display/desktop_observer.h"
class Browser;
class Profile;
@@ -25,7 +26,7 @@ class BrowserListObserver;
}
// Maintains a list of Browser objects.
-class BrowserList {
+class BrowserList : public display::DesktopObserver {
public:
typedef std::vector<Browser*> BrowserVector;
typedef BrowserVector::const_iterator const_iterator;
@@ -94,9 +95,12 @@ class BrowserList {
// across all desktops.
static bool IsOffTheRecordSessionActiveForProfile(Profile* profile);
+ // display::DesktopObserver:
Lei Zhang 2016/06/29 18:30:53 There's a bunch of non-static methods above.
Tom (Use chromium acct) 2016/06/29 20:16:04 Done. (moved to private section)
+ void OnWorkspaceChanged(const std::string& new_workspace) override;
+
private:
BrowserList();
- ~BrowserList();
+ ~BrowserList() override;
// Helper method to remove a browser instance from a list of browsers
static void RemoveBrowserFrom(Browser* browser, BrowserVector* browser_list);
« no previous file with comments | « no previous file | chrome/browser/ui/browser_list.cc » ('j') | chrome/browser/ui/browser_list.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698