Chromium Code Reviews| Index: ios/chrome/browser/tabs/legacy_tab_helper.h |
| diff --git a/ios/chrome/browser/tabs/legacy_tab_helper.h b/ios/chrome/browser/tabs/legacy_tab_helper.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5d295b4e48ef3d7866ae869bc95889440a47246b |
| --- /dev/null |
| +++ b/ios/chrome/browser/tabs/legacy_tab_helper.h |
| @@ -0,0 +1,29 @@ |
| +// 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_CHROME_BROWSER_TABS_LEGACY_TAB_HELPER_H_ |
| +#define IOS_CHROME_BROWSER_TABS_LEGACY_TAB_HELPER_H_ |
| + |
| +#import "base/ios/weak_nsobject.h" |
| +#include "base/macros.h" |
| +#import "ios/web/public/web_state/web_state_user_data.h" |
| + |
| +@class Tab; |
| + |
| +class LegacyTabHelper : public web::WebStateUserData<LegacyTabHelper> { |
|
rohitrao (ping after 24h)
2017/02/08 14:07:17
Class could use a comment explaining what it does
sdefresne
2017/02/08 14:45:34
Done.
|
| + public: |
| + static void CreateForWebState(web::WebState* web_state, Tab* tab); |
| + |
| + Tab* tab() const { return tab_.get(); } |
| + |
| + private: |
| + LegacyTabHelper(web::WebState* web_state, Tab* tab); |
| + ~LegacyTabHelper() override; |
| + |
| + base::WeakNSObject<Tab> tab_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(LegacyTabHelper); |
| +}; |
| + |
| +#endif // IOS_CHROME_BROWSER_TABS_LEGACY_TAB_HELPER_H_ |