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

Side by Side Diff: chrome/browser/ui/browser_list.h

Issue 12114034: Swap BrowserList::const_iterator for the multi-desktop aware BrowserIterator in many scenarios. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/sync/browser_synced_window_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BROWSER_LIST_H_ 5 #ifndef CHROME_BROWSER_UI_BROWSER_LIST_H_
6 #define CHROME_BROWSER_UI_BROWSER_LIST_H_ 6 #define CHROME_BROWSER_UI_BROWSER_LIST_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 11
12 class Browser; 12 class Browser;
13 class Profile; 13 class Profile;
14 14
15 namespace chrome { 15 namespace chrome {
16 class BrowserListObserver; 16 class BrowserListObserver;
17 } 17 }
18 18
19 // Stores a list of all Browser objects. 19 // Stores a list of all Browser objects.
20 class BrowserList { 20 class BrowserList {
21 public: 21 public:
22 typedef std::vector<Browser*> BrowserVector; 22 typedef std::vector<Browser*> BrowserVector;
23 typedef BrowserVector::iterator iterator;
24 typedef BrowserVector::const_iterator const_iterator; 23 typedef BrowserVector::const_iterator const_iterator;
25 typedef BrowserVector::const_reverse_iterator const_reverse_iterator; 24 typedef BrowserVector::const_reverse_iterator const_reverse_iterator;
26 25
27 // Adds and removes browsers from the global list. The browser object should 26 // Adds and removes browsers from the global list. The browser object should
28 // be valid BEFORE these calls (for the benefit of observers), so notify and 27 // be valid BEFORE these calls (for the benefit of observers), so notify and
29 // THEN delete the object. 28 // THEN delete the object.
30 static void AddBrowser(Browser* browser); 29 static void AddBrowser(Browser* browser);
31 static void RemoveBrowser(Browser* browser); 30 static void RemoveBrowser(Browser* browser);
32 31
33 static void AddObserver(chrome::BrowserListObserver* observer); 32 static void AddObserver(chrome::BrowserListObserver* observer);
(...skipping 22 matching lines...) Expand all
56 static const_reverse_iterator end_last_active(); 55 static const_reverse_iterator end_last_active();
57 56
58 // Returns true if at least one incognito session is active. 57 // Returns true if at least one incognito session is active.
59 static bool IsOffTheRecordSessionActive(); 58 static bool IsOffTheRecordSessionActive();
60 59
61 // Returns true if at least one incognito session is active for |profile|. 60 // Returns true if at least one incognito session is active for |profile|.
62 static bool IsOffTheRecordSessionActiveForProfile(Profile* profile); 61 static bool IsOffTheRecordSessionActiveForProfile(Profile* profile);
63 }; 62 };
64 63
65 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_ 64 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/sync/browser_synced_window_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698