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.
5 #ifndef IOS_CHROME_BROWSER_XCALLBACK_PARAMETERS_H_
6 #define IOS_CHROME_BROWSER_XCALLBACK_PARAMETERS_H_
8 #import <Foundation/Foundation.h>
12 // This class contains the defining parameters for an XCallback request from
14 @interface XCallbackParameters
: NSObject
<NSCoding
, NSCopying
>
16 // The id of the calling app.
17 @
property(nonatomic
, readonly
, copy
) NSString
* sourceAppId
;
19 // The user visible name of the calling app. Can be nil.
20 @
property(nonatomic
, readonly
, copy
) NSString
* sourceAppName
;
22 // x-callback-url::x-success URL. If the app is opened using a x-callback-url
23 // compliant URL, the value of this parameter is used as callback URL when the
24 // user taps the back button.
25 @
property(nonatomic
, readonly
) const GURL
& successURL
;
27 // Flag to force the creation of a new tab. Default YES.
28 @
property(nonatomic
, readonly
) BOOL createNewTab
;
30 - (instancetype
)initWithSourceAppId
:(NSString
*)sourceAppId
31 sourceAppName
:(NSString
*)sourceAppName
32 successURL
:(const GURL
&)successURL
33 createNewTab
:(BOOL
)createNewTab
34 NS_DESIGNATED_INITIALIZER
;
36 - (instancetype
)init NS_UNAVAILABLE
;
40 #endif // IOS_CHROME_BROWSER_XCALLBACK_PARAMETERS_H_