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

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

Issue 2935653002: [ios clean] Move dispatcher out of Browser.
Patch Set: Dispatcher out of Browser. Created 3 years, 6 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_SHARED_CHROME_BROWSER_UI_BROWSER_LIST_BROWSER_H_ 5 #ifndef IOS_SHARED_CHROME_BROWSER_UI_BROWSER_LIST_BROWSER_H_
6 #define IOS_SHARED_CHROME_BROWSER_UI_BROWSER_LIST_BROWSER_H_ 6 #define IOS_SHARED_CHROME_BROWSER_UI_BROWSER_LIST_BROWSER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 11
12 class WebStateList; 12 class WebStateList;
13 class WebStateListDelegate; 13 class WebStateListDelegate;
14 14
15 @class ChromeBroadcaster; 15 @class ChromeBroadcaster;
16 @class CommandDispatcher;
17 16
18 namespace ios { 17 namespace ios {
19 class ChromeBrowserState; 18 class ChromeBrowserState;
20 } 19 }
21 20
22 // Browser holds the state backing a collection of Tabs and the attached 21 // Browser holds the state backing a collection of Tabs and the attached
23 // UI elements (Tab strip, ...). 22 // UI elements (Tab strip, ...).
24 class Browser { 23 class Browser {
25 public: 24 public:
26 explicit Browser(ios::ChromeBrowserState* browser_state); 25 explicit Browser(ios::ChromeBrowserState* browser_state);
27 ~Browser(); 26 ~Browser();
28 27
29 WebStateList& web_state_list() { return *web_state_list_.get(); } 28 WebStateList& web_state_list() { return *web_state_list_.get(); }
30 const WebStateList& web_state_list() const { return *web_state_list_.get(); } 29 const WebStateList& web_state_list() const { return *web_state_list_.get(); }
31 30
32 CommandDispatcher* dispatcher() { return dispatcher_; }
33
34 ios::ChromeBrowserState* browser_state() const { return browser_state_; } 31 ios::ChromeBrowserState* browser_state() const { return browser_state_; }
35 32
36 ChromeBroadcaster* broadcaster() { return broadcaster_; } 33 ChromeBroadcaster* broadcaster() { return broadcaster_; }
37 34
38 private: 35 private:
39 __strong ChromeBroadcaster* broadcaster_; 36 __strong ChromeBroadcaster* broadcaster_;
40 __strong CommandDispatcher* dispatcher_;
41 ios::ChromeBrowserState* browser_state_; 37 ios::ChromeBrowserState* browser_state_;
42 std::unique_ptr<WebStateListDelegate> web_state_list_delegate_; 38 std::unique_ptr<WebStateListDelegate> web_state_list_delegate_;
43 std::unique_ptr<WebStateList> web_state_list_; 39 std::unique_ptr<WebStateList> web_state_list_;
44 40
45 DISALLOW_COPY_AND_ASSIGN(Browser); 41 DISALLOW_COPY_AND_ASSIGN(Browser);
46 }; 42 };
47 43
48 #endif // IOS_SHARED_CHROME_BROWSER_UI_BROWSER_LIST_BROWSER_H_ 44 #endif // IOS_SHARED_CHROME_BROWSER_UI_BROWSER_LIST_BROWSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698