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

Side by Side Diff: docs/ios/opening_links.md

Issue 2778973002: Add the user agent content into the docs repo. (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | docs/ios/user_agent.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Opening links in Chrome for iOS</h1> 1 # Opening links in Chrome for iOS
2 2
3 The easiest way to have your iOS app open links in Chrome is to use the 3 The easiest way to have your iOS app open links in Chrome is to use the
4 [OpenInChromeController](https://github.com/GoogleChrome/OpenInChrome) class. 4 [OpenInChromeController](https://github.com/GoogleChrome/OpenInChrome) class.
5 This API is described here along with the URI schemes it supports. 5 This API is described here along with the URI schemes it supports.
6 6
7 ## Using OpenInChromeController to open links 7 ## Using OpenInChromeController to open links
8 8
9 The **OpenInChromeController** class provides methods that 9 The **OpenInChromeController** class provides methods that
10 encapsulate the URI schemes and the scheme replacement process also described 10 encapsulate the URI schemes and the scheme replacement process also described
11 in this document. Use this class to check if Chrome is installed or to specify 11 in this document. Use this class to check if Chrome is installed or to specify
12 the URL to open. 12 the URL to open.
13 13
14 ### Methods 14 ### Methods
15 15
16 * `isChromeInstalled`: returns YES if Chrome is installed</li> 16 * `isChromeInstalled`: returns YES if Chrome is installed
17 * `openInChrome`: opens a given URL in Chrome</li> 17 * `openInChrome`: opens a given URL in Chrome
18 18
19 For example, use the OpenInChromeController class as follows: 19 For example, use the OpenInChromeController class as follows:
20 20
21 ``` 21 ```
22 if ([openInController_ isChromeInstalled]) { 22 if ([openInController_ isChromeInstalled]) {
23 [openInController_ openInChrome:urlToOpen]; 23 [openInController_ openInChrome:urlToOpen];
24 } 24 }
25 ``` 25 ```
26 26
27 ## Downloading the class file 27 ## Downloading the class file
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 the URL to the Google Chrome equivalent. When Google Chrome opens, the 86 the URL to the Google Chrome equivalent. When Google Chrome opens, the
87 URL passed as a parameter will be opened in a new tab. 87 URL passed as a parameter will be opened in a new tab.
88 88
89 If Chrome is not installed the user can be prompted to download it from the App Store. 89 If Chrome is not installed the user can be prompted to download it from the App Store.
90 If the user agrees, the app can open the App Store download page using the follo wing: 90 If the user agrees, the app can open the App Store download page using the follo wing:
91 91
92 ``` 92 ```
93 [[UIApplication sharedApplication] openURL:[NSURL URLWithString: 93 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:
94 @"itms-apps://itunes.apple.com/us/app/chrome/id535886823"]]; 94 @"itms-apps://itunes.apple.com/us/app/chrome/id535886823"]];
95 ``` 95 ```
OLDNEW
« no previous file with comments | « no previous file | docs/ios/user_agent.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698