| 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_STORE_KIT_STORE_KIT_TAB_HELPER_H_ |
| 6 #define IOS_CHROME_BROWSER_STORE_KIT_STORE_KIT_TAB_HELPER_H_ |
| 7 |
| 8 #include "base/ios/weak_nsobject.h" |
| 9 #include "base/macros.h" |
| 10 #import "ios/chrome/browser/store_kit/store_kit_launcher.h" |
| 11 #import "ios/web/public/web_state/web_state_user_data.h" |
| 12 |
| 13 // A Tab Helper object that can open to a page on iOS App Store for a given |
| 14 // app product ID. |
| 15 class StoreKitTabHelper : public web::WebStateUserData<StoreKitTabHelper> { |
| 16 public: |
| 17 explicit StoreKitTabHelper(web::WebState* web_state); |
| 18 ~StoreKitTabHelper() override; |
| 19 |
| 20 void SetLauncher(id<StoreKitLauncher> launcher); |
| 21 id<StoreKitLauncher> GetLauncher(); |
| 22 |
| 23 void OpenAppStore(NSString* app_id); |
| 24 |
| 25 private: |
| 26 base::WeakNSProtocol<id<StoreKitLauncher>> store_kit_launcher_; |
| 27 |
| 28 DISALLOW_COPY_AND_ASSIGN(StoreKitTabHelper); |
| 29 }; |
| 30 |
| 31 #endif // IOS_CHROME_BROWSER_STORE_KIT_STORE_KIT_TAB_HELPER_H_ |
| OLD | NEW |