| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
| 12 #include "chrome/browser/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
| 13 | 13 |
| 14 // Stores a list of all Browser objects. | 14 // Stores a list of all Browser objects. |
| 15 class BrowserList { | 15 class BrowserList { |
| 16 public: | 16 public: |
| 17 typedef std::vector<Browser*> BrowserVector; | 17 typedef std::vector<Browser*> BrowserVector; |
| 18 typedef BrowserVector::iterator iterator; | 18 typedef BrowserVector::iterator iterator; |
| 19 typedef BrowserVector::const_iterator const_iterator; | 19 typedef BrowserVector::const_iterator const_iterator; |
| 20 typedef BrowserVector::const_reverse_iterator const_reverse_iterator; | 20 typedef BrowserVector::const_reverse_iterator const_reverse_iterator; |
| 21 | 21 |
| 22 // It is not allowed to change the global window list (add or remove any | 22 // It is not allowed to change the global window list (add or remove any |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 // tab index into the current Browser of the current web view | 226 // tab index into the current Browser of the current web view |
| 227 int web_view_index_; | 227 int web_view_index_; |
| 228 | 228 |
| 229 // Current TabContents, or NULL if we're at the end of the list. This can | 229 // Current TabContents, or NULL if we're at the end of the list. This can |
| 230 // be extracted given the browser iterator and index, but it's nice to cache | 230 // be extracted given the browser iterator and index, but it's nice to cache |
| 231 // this since the caller may access the current host many times. | 231 // this since the caller may access the current host many times. |
| 232 TabContents* cur_; | 232 TabContents* cur_; |
| 233 }; | 233 }; |
| 234 | 234 |
| 235 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_ | 235 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_ |
| OLD | NEW |