Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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_ITUNES_LINKS_ITUNES_LINKS_OBSERVER_H_ | |
| 6 #define IOS_CHROME_BROWSER_ITUNES_LINKS_ITUNES_LINKS_OBSERVER_H_ | |
| 7 | |
| 8 #import <Foundation/Foundation.h> | |
| 9 | |
| 10 #import "ios/web/public/web_state/web_state_observer_bridge.h" | |
| 11 | |
| 12 namespace web { | |
| 13 class WebState; | |
| 14 }; | |
| 15 | |
| 16 @protocol StoreKitLauncher; | |
| 17 | |
| 18 // Instances of this class observe navigation events. If a page concerning a | |
| 19 // product on the iTunes App Store is loaded, this class will trigger the | |
| 20 // opening of a SKStoreProductViewController presenting the information of the | |
| 21 // said product. | |
| 22 // The goal of this class is to workaround a bug where Apple serves the wrong | |
| 23 // content for itunes.apple.com pages, see crbug.com/623016. | |
|
sdefresne
2016/07/25 12:05:37
nit: http://crbug.com/623016
jif
2016/07/25 12:58:27
Done.
| |
| 24 @interface ITunesLinksObserver : NSObject<CRWWebStateObserver> | |
| 25 - (instancetype)initWithWebState:(web::WebState*)webState | |
| 26 NS_DESIGNATED_INITIALIZER; | |
| 27 | |
| 28 - (instancetype)init NS_UNAVAILABLE; | |
| 29 | |
| 30 // Sets the object responsible for showing the App Store product page. | |
| 31 // |storeKitLauncher| can be nil. | |
| 32 - (void)setStoreKitLauncher:(id<StoreKitLauncher>)storeKitLauncher; | |
| 33 | |
| 34 @end | |
| 35 | |
| 36 #endif // IOS_CHROME_BROWSER_ITUNES_LINKS_ITUNES_LINKS_OBSERVER_H_ | |
| OLD | NEW |