OLD | NEW |
(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_UI_COMMANDS_OPEN_URL_COMMAND_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_COMMANDS_OPEN_URL_COMMAND_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" |
| 11 #import "ios/chrome/browser/ui/url_loader.h" |
| 12 |
| 13 namespace web { |
| 14 struct Referrer; |
| 15 } |
| 16 |
| 17 class GURL; |
| 18 |
| 19 // A command to open a new tab. |
| 20 @interface OpenUrlCommand : GenericChromeCommand |
| 21 |
| 22 // Whether or not this URL command comes from a chrome context (e.g., settings), |
| 23 // as opposed to a web page context. |
| 24 @property(nonatomic, readonly) BOOL fromChrome; |
| 25 |
| 26 // Initializes a command intended to open a URL as a link from a page. |
| 27 // Designated initializer. |
| 28 - (id)initWithURL:(const GURL&)url |
| 29 referrer:(const web::Referrer&)referrer |
| 30 windowName:(NSString*)windowName |
| 31 inIncognito:(BOOL)inIncognito |
| 32 inBackground:(BOOL)inBackground |
| 33 appendTo:(OpenPosition)append; |
| 34 |
| 35 // Initializes a command intended to open a URL from browser chrome (e.g., |
| 36 // settings). This will always open in a new foreground tab in non-incognito |
| 37 // mode. |
| 38 - (id)initWithURLFromChrome:(const GURL&)url; |
| 39 |
| 40 - (const GURL&)url; |
| 41 - (const web::Referrer&)referrer; |
| 42 - (NSString*)windowName; |
| 43 - (BOOL)inIncognito; |
| 44 - (BOOL)inBackground; |
| 45 - (OpenPosition)appendTo; |
| 46 |
| 47 @end |
| 48 |
| 49 #endif // IOS_CHROME_BROWSER_UI_COMMANDS_OPEN_URL_COMMAND_H_ |
OLD | NEW |