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

Unified Diff: ios/clean/chrome/browser/model/browser_web_state_list_delegate.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 side-by-side diff with in-line comments
Download patch
Index: ios/clean/chrome/browser/model/browser_web_state_list_delegate.h
diff --git a/ios/clean/chrome/browser/model/browser_web_state_list_delegate.h b/ios/clean/chrome/browser/model/browser_web_state_list_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..dab5cf0f2edbe4bc53849f5d984e285e6edd85f5
--- /dev/null
+++ b/ios/clean/chrome/browser/model/browser_web_state_list_delegate.h
@@ -0,0 +1,28 @@
+// 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_WEB_STATE_LIST_DELEGATE_H_
+#define IOS_CLEAN_CHROME_BROWSER_MODEL_BROWSER_WEB_STATE_LIST_DELEGATE_H_
+
+#include "base/macros.h"
+#import "ios/shared/chrome/browser/tabs/web_state_list_delegate.h"
+
+class Browser;
+
+// WebStateList delegate for the new architecture.
+class BrowserWebStateListDelegate : public WebStateListDelegate {
+ public:
+ explicit BrowserWebStateListDelegate(Browser* browser);
+ ~BrowserWebStateListDelegate() override;
+
+ // WebStateListDelegate implementation.
+ void WillAddWebState(web::WebState* web_state) override;
+
+ private:
+ Browser* browser_;
+
+ DISALLOW_COPY_AND_ASSIGN(BrowserWebStateListDelegate);
+};
+
+#endif // IOS_CLEAN_CHROME_BROWSER_MODEL_BROWSER_WEB_STATE_LIST_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698