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 explicit TabIDTabHelper(web::WebState* web_state); | |
21 friend class web::WebStateUserData<TabIDTabHelper>; | |
22 NSString* tab_id_; | |
sdefresne
2017/06/23 16:57:03
__strong NSString* tab_id_;
edchin
2017/06/23 22:40:09
Done.
| |
23 | |
24 DISALLOW_COPY_AND_ASSIGN(TabIDTabHelper); | |
25 }; | |
26 | |
27 #endif // IOS_CHROME_BROWSER_WEB_TAB_ID_TAB_HELPER_H_ | |
OLD | NEW |