| 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_CHROME_BROWSER_TABS_TAB_MODEL_WEB_STATE_LIST_DELEGATE_H_ | 5 #ifndef IOS_CHROME_BROWSER_TABS_TAB_MODEL_WEB_STATE_LIST_DELEGATE_H_ |
| 6 #define IOS_CHROME_BROWSER_TABS_TAB_MODEL_WEB_STATE_LIST_DELEGATE_H_ | 6 #define IOS_CHROME_BROWSER_TABS_TAB_MODEL_WEB_STATE_LIST_DELEGATE_H_ |
| 7 | 7 |
| 8 #import "base/ios/weak_nsobject.h" | 8 #import "base/ios/weak_nsobject.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #import "ios/shared/chrome/browser/tabs/web_state_list_delegate.h" | 10 #import "ios/shared/chrome/browser/tabs/web_state_list_delegate.h" |
| 11 | 11 |
| 12 @class TabModel; | 12 @class TabModel; |
| 13 | 13 |
| 14 // WebStateList delegate for the old architecture. | 14 // WebStateList delegate for the old architecture. |
| 15 class TabModelWebStateListDelegate : public WebStateListDelegate { | 15 class TabModelWebStateListDelegate : public WebStateListDelegate { |
| 16 public: | 16 public: |
| 17 explicit TabModelWebStateListDelegate(TabModel* tab_model); | 17 explicit TabModelWebStateListDelegate(TabModel* tab_model); |
| 18 ~TabModelWebStateListDelegate() override; | 18 ~TabModelWebStateListDelegate() override; |
| 19 | 19 |
| 20 // WebStateListDelegate implementation. | 20 // WebStateListDelegate implementation. |
| 21 void WillAddWebState(web::WebState* web_state) override; | 21 void WillAddWebState(web::WebState* web_state) override; |
| 22 void WebStateDetached(web::WebState* web_state) override; |
| 22 | 23 |
| 23 private: | 24 private: |
| 24 base::WeakNSObject<TabModel> tab_model_; | 25 base::WeakNSObject<TabModel> tab_model_; |
| 25 | 26 |
| 26 DISALLOW_COPY_AND_ASSIGN(TabModelWebStateListDelegate); | 27 DISALLOW_COPY_AND_ASSIGN(TabModelWebStateListDelegate); |
| 27 }; | 28 }; |
| 28 | 29 |
| 29 #endif // IOS_CHROME_BROWSER_TABS_TAB_MODEL_WEB_STATE_LIST_DELEGATE_H_ | 30 #endif // IOS_CHROME_BROWSER_TABS_TAB_MODEL_WEB_STATE_LIST_DELEGATE_H_ |
| OLD | NEW |