OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_WEB_TAB_ID_TAB_HELPER_H_ |
| 6 #define IOS_CHROME_BROWSER_WEB_TAB_ID_TAB_HELPER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #import "ios/web/public/web_state/web_state_user_data.h" |
| 10 |
| 11 // Handles creating a unique identifier, which is stable across cold starts. |
| 12 class TabIdTabHelper : public web::WebStateUserData<TabIdTabHelper> { |
| 13 public: |
| 14 ~TabIdTabHelper() override; |
| 15 |
| 16 // Returns a unique identifier for this tab. |
| 17 NSString* tab_id() const { return tab_id_; } |
| 18 |
| 19 private: |
| 20 friend class web::WebStateUserData<TabIdTabHelper>; |
| 21 explicit TabIdTabHelper(web::WebState* web_state); |
| 22 __strong NSString* tab_id_; |
| 23 |
| 24 DISALLOW_COPY_AND_ASSIGN(TabIdTabHelper); |
| 25 }; |
| 26 |
| 27 #endif // IOS_CHROME_BROWSER_WEB_TAB_ID_TAB_HELPER_H_ |
OLD | NEW |