Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: ios/chrome/browser/itunes_links/itunes_links_observer.h

Issue 2176503003: Intercept iTunes links and open iTunes controller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/itunes_links/OWNERS ('k') | ios/chrome/browser/itunes_links/itunes_links_observer.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/itunes_links/itunes_links_observer.h
diff --git a/ios/chrome/browser/itunes_links/itunes_links_observer.h b/ios/chrome/browser/itunes_links/itunes_links_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..4cf8ea0bba8aaaf303cb65caa00aa0876065fcc3
--- /dev/null
+++ b/ios/chrome/browser/itunes_links/itunes_links_observer.h
@@ -0,0 +1,36 @@
+// Copyright 2016 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_ITUNES_LINKS_ITUNES_LINKS_OBSERVER_H_
+#define IOS_CHROME_BROWSER_ITUNES_LINKS_ITUNES_LINKS_OBSERVER_H_
+
+#import <Foundation/Foundation.h>
+
+#import "ios/web/public/web_state/web_state_observer_bridge.h"
+
+namespace web {
+class WebState;
+};
+
+@protocol StoreKitLauncher;
+
+// Instances of this class observe navigation events. If a page concerning a
+// product on the iTunes App Store is loaded, this class will trigger the
+// opening of a SKStoreProductViewController presenting the information of the
+// said product.
+// The goal of this class is to workaround a bug where Apple serves the wrong
+// content for itunes.apple.com pages, see http://crbug.com/623016.
+@interface ITunesLinksObserver : NSObject<CRWWebStateObserver>
+- (instancetype)initWithWebState:(web::WebState*)webState
+ NS_DESIGNATED_INITIALIZER;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+// Sets the object responsible for showing the App Store product page.
+// |storeKitLauncher| can be nil.
+- (void)setStoreKitLauncher:(id<StoreKitLauncher>)storeKitLauncher;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_ITUNES_LINKS_ITUNES_LINKS_OBSERVER_H_
« no previous file with comments | « ios/chrome/browser/itunes_links/OWNERS ('k') | ios/chrome/browser/itunes_links/itunes_links_observer.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698