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

Unified Diff: ios/clean/chrome/browser/model/browser.h

Issue 2727353006: Introduce BrowserList and Browser classes for iOS. (Closed)
Patch Set: Add blank line. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/clean/chrome/browser/model/BUILD.gn ('k') | ios/clean/chrome/browser/model/browser.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/clean/chrome/browser/model/browser.h
diff --git a/ios/clean/chrome/browser/model/browser.h b/ios/clean/chrome/browser/model/browser.h
new file mode 100644
index 0000000000000000000000000000000000000000..0e5349f84687719f8b6f40daf977806656e4b8e8
--- /dev/null
+++ b/ios/clean/chrome/browser/model/browser.h
@@ -0,0 +1,34 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CLEAN_CHROME_BROWSER_MODEL_BROWSER_H_
+#define IOS_CLEAN_CHROME_BROWSER_MODEL_BROWSER_H_
+
+#include "base/macros.h"
+#include "ios/shared/chrome/browser/tabs/web_state_list.h"
+
+namespace ios {
+class ChromeBrowserState;
+}
+
+// Browser holds the state backing a collection of Tabs and the attached
+// UI elements (Tab strip, ...).
+class Browser {
+ public:
+ explicit Browser(ios::ChromeBrowserState* browser_state);
+ ~Browser();
+
+ WebStateList& web_state_list() { return web_state_list_; }
+ const WebStateList& web_state_list() const { return web_state_list_; }
+
+ ios::ChromeBrowserState* browser_state() const { return browser_state_; }
+
+ private:
+ WebStateList web_state_list_;
+ ios::ChromeBrowserState* browser_state_;
+
+ DISALLOW_COPY_AND_ASSIGN(Browser);
+};
+
+#endif // IOS_CLEAN_CHROME_BROWSER_MODEL_BROWSER_H_
« no previous file with comments | « ios/clean/chrome/browser/model/BUILD.gn ('k') | ios/clean/chrome/browser/model/browser.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698