Chromium Code Reviews| 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_H_ | 5 #ifndef IOS_CLEAN_CHROME_BROWSER_MODEL_BROWSER_H_ |
| 6 #define IOS_CLEAN_CHROME_BROWSER_MODEL_BROWSER_H_ | 6 #define IOS_CLEAN_CHROME_BROWSER_MODEL_BROWSER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ios/shared/chrome/browser/tabs/web_state_list.h" | 9 #include "ios/shared/chrome/browser/tabs/web_state_list.h" |
| 10 | 10 |
| 11 @class CommandDispatcher; | |
| 12 | |
| 11 namespace ios { | 13 namespace ios { |
| 12 class ChromeBrowserState; | 14 class ChromeBrowserState; |
| 13 } | 15 } |
| 14 | 16 |
| 15 // Browser holds the state backing a collection of Tabs and the attached | 17 // Browser holds the state backing a collection of Tabs and the attached |
| 16 // UI elements (Tab strip, ...). | 18 // UI elements (Tab strip, ...). |
| 17 class Browser { | 19 class Browser { |
| 18 public: | 20 public: |
| 19 explicit Browser(ios::ChromeBrowserState* browser_state); | 21 explicit Browser(ios::ChromeBrowserState* browser_state); |
| 20 ~Browser(); | 22 ~Browser(); |
| 21 | 23 |
| 22 WebStateList& web_state_list() { return web_state_list_; } | 24 WebStateList& web_state_list() { return web_state_list_; } |
| 23 const WebStateList& web_state_list() const { return web_state_list_; } | 25 const WebStateList& web_state_list() const { return web_state_list_; } |
| 24 | 26 |
| 27 CommandDispatcher* dispatcher() { return dispatcher_; } | |
|
rohitrao (ping after 24h)
2017/03/14 01:10:36
2) Added the dispatcher to Browser, as discussed.
| |
| 28 | |
| 25 ios::ChromeBrowserState* browser_state() const { return browser_state_; } | 29 ios::ChromeBrowserState* browser_state() const { return browser_state_; } |
| 26 | 30 |
| 27 private: | 31 private: |
| 28 WebStateList web_state_list_; | 32 WebStateList web_state_list_; |
| 33 __strong CommandDispatcher* dispatcher_; | |
| 29 ios::ChromeBrowserState* browser_state_; | 34 ios::ChromeBrowserState* browser_state_; |
| 30 | 35 |
| 31 DISALLOW_COPY_AND_ASSIGN(Browser); | 36 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 32 }; | 37 }; |
| 33 | 38 |
| 34 #endif // IOS_CLEAN_CHROME_BROWSER_MODEL_BROWSER_H_ | 39 #endif // IOS_CLEAN_CHROME_BROWSER_MODEL_BROWSER_H_ |
| OLD | NEW |