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

Side by Side Diff: ios/chrome/browser/chrome_url_util.h

Issue 1139383002: [iOS] Upstream URL utilities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address rohitrao comments Created 5 years, 7 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 | ios/chrome/browser/chrome_url_util.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2012 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_CHROME_URL_UTIL_H_
6 #define IOS_CHROME_BROWSER_CHROME_URL_UTIL_H_
7
8 #import <Foundation/Foundation.h>
9
10 class GURL;
11
12 // Returns whether |url| is an external file reference.
13 bool UrlIsExternalFileReference(const GURL& url);
14
15 // Returns a URL that launches Chrome.
16 NSURL* UrlToLaunchChrome();
17
18 // Returns the URL for the iOS App Icon for Chrome.
19 NSURL* UrlOfChromeAppIcon(int width, int height);
20
21 // Returns true if the scheme has a chrome scheme.
22 bool UrlHasChromeScheme(const GURL& url);
23 bool UrlHasChromeScheme(NSURL* url);
24
25 // Singleton object that generates constants for Chrome iOS applications.
26 // Behavior of this object can be overridden by unit tests.
27 @interface ChromeAppConstants : NSObject
28
29 // Class method returning the singleton instance.
30 + (ChromeAppConstants*)sharedInstance;
31
32 // Returns the URL scheme that launches Chrome.
33 - (NSString*)getBundleURLScheme;
34
35 // Returns the URL string to the Chrome application icon.
36 - (NSString*)getChromeAppIconURLOfWidth:(int)width height:(int)height;
37
38 // Method to set the scheme to callback Chrome iOS for testing.
39 - (void)setCallbackSchemeForTesting:(NSString*)callbackScheme;
40
41 // Method to set a different block to provider the App Icon URL.
42 typedef NSString* (^AppIconURLProvider)(int, int);
43 - (void)setAppIconURLProviderForTesting:(AppIconURLProvider)block;
44
45 @end
46
47 #endif // IOS_CHROME_BROWSER_CHROME_URL_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/chrome_url_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698