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

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

Issue 12211139: Phase out BrowserList::empty() and BrowserList::size(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos 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
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"
(...skipping 20 matching lines...) Expand all
31 static void AddObserver(chrome::BrowserListObserver* observer); 31 static void AddObserver(chrome::BrowserListObserver* observer);
32 static void RemoveObserver(chrome::BrowserListObserver* observer); 32 static void RemoveObserver(chrome::BrowserListObserver* observer);
33 33
34 // Called by Browser objects when their window is activated (focused). This 34 // Called by Browser objects when their window is activated (focused). This
35 // allows us to determine what the last active Browser was. 35 // allows us to determine what the last active Browser was.
36 static void SetLastActive(Browser* browser); 36 static void SetLastActive(Browser* browser);
37 37
38 // Closes all browsers for |profile| across all desktops. 38 // Closes all browsers for |profile| across all desktops.
39 static void CloseAllBrowsersWithProfile(Profile* profile); 39 static void CloseAllBrowsersWithProfile(Profile* profile);
40 40
41 static bool empty();
42 static size_t size();
43
44 // Returns iterated access to list of open browsers ordered by when 41 // Returns iterated access to list of open browsers ordered by when
45 // they were last active. The underlying data structure is a vector 42 // they were last active. The underlying data structure is a vector
46 // and we push_back on recent access so a reverse iterator gives the 43 // and we push_back on recent access so a reverse iterator gives the
47 // latest accessed browser first. 44 // latest accessed browser first.
48 static const_reverse_iterator begin_last_active(); 45 static const_reverse_iterator begin_last_active();
49 static const_reverse_iterator end_last_active(); 46 static const_reverse_iterator end_last_active();
50 47
51 // Returns true if at least one incognito session is active. 48 // Returns true if at least one incognito session is active.
52 static bool IsOffTheRecordSessionActive(); 49 static bool IsOffTheRecordSessionActive();
53 50
54 // Returns true if at least one incognito session is active for |profile|. 51 // Returns true if at least one incognito session is active for |profile|.
55 static bool IsOffTheRecordSessionActiveForProfile(Profile* profile); 52 static bool IsOffTheRecordSessionActiveForProfile(Profile* profile);
56 }; 53 };
57 54
58 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_ 55 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app_browsertest.cc ('k') | chrome/browser/ui/browser_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698