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

Side by Side Diff: ios/clean/chrome/browser/model/browser_list.h

Issue 2748793002: [ios] Add a delegate to WebStateList class. (Closed)
Patch Set: Browser owns the BrowserWebStateListDelegate. Created 3 years, 9 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
OLDNEW
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698