| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 IOS_CLEAN_CHROME_BROWSER_MODEL_BROWSER_LIST_H_ | 5 #ifndef IOS_CLEAN_CHROME_BROWSER_MODEL_BROWSER_LIST_H_ |
| 6 #define IOS_CLEAN_CHROME_BROWSER_MODEL_BROWSER_LIST_H_ | 6 #define IOS_CLEAN_CHROME_BROWSER_MODEL_BROWSER_LIST_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <vector> | 9 #include <vector> |
| 9 | 10 |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 11 #include "base/supports_user_data.h" | 12 #include "base/supports_user_data.h" |
| 12 #include "ios/clean/chrome/browser/model/browser.h" | 13 #include "ios/clean/chrome/browser/model/browser.h" |
| 13 | 14 |
| 14 namespace ios { | 15 namespace ios { |
| 15 class ChromeBrowserState; | 16 class ChromeBrowserState; |
| 16 } | 17 } |
| 17 | 18 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 32 // Returns the Browser at the specified index. | 33 // Returns the Browser at the specified index. |
| 33 Browser* GetBrowserAtIndex(int index) const; | 34 Browser* GetBrowserAtIndex(int index) const; |
| 34 | 35 |
| 35 // Creates and returns a new Browser instance. | 36 // Creates and returns a new Browser instance. |
| 36 Browser* CreateNewBrowser(); | 37 Browser* CreateNewBrowser(); |
| 37 | 38 |
| 38 // Closes the Browser at the specified index. | 39 // Closes the Browser at the specified index. |
| 39 void CloseBrowserAtIndex(int index); | 40 void CloseBrowserAtIndex(int index); |
| 40 | 41 |
| 41 private: | 42 private: |
| 43 ios::ChromeBrowserState* browser_state_; |
| 42 std::vector<std::unique_ptr<Browser>> browsers_; | 44 std::vector<std::unique_ptr<Browser>> browsers_; |
| 43 ios::ChromeBrowserState* browser_state_; | |
| 44 | 45 |
| 45 DISALLOW_COPY_AND_ASSIGN(BrowserList); | 46 DISALLOW_COPY_AND_ASSIGN(BrowserList); |
| 46 }; | 47 }; |
| 47 | 48 |
| 48 #endif // IOS_CLEAN_CHROME_BROWSER_MODEL_BROWSER_LIST_H_ | 49 #endif // IOS_CLEAN_CHROME_BROWSER_MODEL_BROWSER_LIST_H_ |
| OLD | NEW |