|
19 | 19 |
|
20 | 20 | #import <Cordova/CDVPlugin.h>
|
21 | 21 | #import <Cordova/CDVInvokedUrlCommand.h>
|
22 |
| -#import <Cordova/CDVScreenOrientationDelegate.h> |
23 | 22 |
|
24 |
| -#ifdef __CORDOVA_4_0_0 |
25 |
| - #import <Cordova/CDVUIWebViewDelegate.h> |
26 |
| -#else |
27 |
| - #import <Cordova/CDVWebViewDelegate.h> |
28 |
| -#endif |
| 23 | +@interface CDVInAppBrowser : CDVPlugin {} |
29 | 24 |
|
30 |
| -@class CDVInAppBrowserViewController; |
31 |
| - |
32 |
| -@interface CDVInAppBrowser : CDVPlugin { |
33 |
| - UIWindow * tmpWindow; |
34 |
| -} |
35 |
| - |
36 |
| -@property (nonatomic, retain) CDVInAppBrowserViewController* inAppBrowserViewController; |
37 |
| -@property (nonatomic, copy) NSString* callbackId; |
38 |
| -@property (nonatomic, copy) NSRegularExpression *callbackIdPattern; |
| 25 | +@property (nonatomic, assign) BOOL wkwebviewavailable; |
| 26 | +@property (nonatomic, assign) BOOL usewkwebview; |
39 | 27 |
|
40 | 28 | - (void)open:(CDVInvokedUrlCommand*)command;
|
41 | 29 | - (void)close:(CDVInvokedUrlCommand*)command;
|
|
45 | 33 |
|
46 | 34 | @end
|
47 | 35 |
|
48 |
| -@interface CDVInAppBrowserOptions : NSObject {} |
49 |
| - |
50 |
| -@property (nonatomic, assign) BOOL location; |
51 |
| -@property (nonatomic, assign) BOOL toolbar; |
52 |
| -@property (nonatomic, copy) NSString* closebuttoncaption; |
53 |
| -@property (nonatomic, copy) NSString* closebuttoncolor; |
54 |
| -@property (nonatomic, copy) NSString* toolbarposition; |
55 |
| -@property (nonatomic, copy) NSString* toolbarcolor; |
56 |
| -@property (nonatomic, assign) BOOL toolbartranslucent; |
57 |
| -@property (nonatomic, assign) BOOL hidenavigationbuttons; |
58 |
| -@property (nonatomic, copy) NSString* navigationbuttoncolor; |
59 |
| -@property (nonatomic, assign) BOOL clearcache; |
60 |
| -@property (nonatomic, assign) BOOL clearsessioncache; |
61 |
| -@property (nonatomic, assign) BOOL hidespinner; |
62 |
| - |
63 |
| -@property (nonatomic, copy) NSString* presentationstyle; |
64 |
| -@property (nonatomic, copy) NSString* transitionstyle; |
65 |
| - |
66 |
| -@property (nonatomic, assign) BOOL enableviewportscale; |
67 |
| -@property (nonatomic, assign) BOOL mediaplaybackrequiresuseraction; |
68 |
| -@property (nonatomic, assign) BOOL allowinlinemediaplayback; |
69 |
| -@property (nonatomic, assign) BOOL keyboarddisplayrequiresuseraction; |
70 |
| -@property (nonatomic, assign) BOOL suppressesincrementalrendering; |
71 |
| -@property (nonatomic, assign) BOOL hidden; |
72 |
| -@property (nonatomic, assign) BOOL disallowoverscroll; |
73 |
| - |
74 |
| -+ (CDVInAppBrowserOptions*)parseOptions:(NSString*)options; |
75 |
| - |
76 |
| -@end |
77 |
| - |
78 |
| -@interface CDVInAppBrowserViewController : UIViewController <UIWebViewDelegate, CDVScreenOrientationDelegate>{ |
79 |
| - @private |
80 |
| - NSString* _userAgent; |
81 |
| - NSString* _prevUserAgent; |
82 |
| - NSInteger _userAgentLockToken; |
83 |
| - CDVInAppBrowserOptions *_browserOptions; |
84 |
| - |
85 |
| -#ifdef __CORDOVA_4_0_0 |
86 |
| - CDVUIWebViewDelegate* _webViewDelegate; |
87 |
| -#else |
88 |
| - CDVWebViewDelegate* _webViewDelegate; |
89 |
| -#endif |
90 |
| - |
91 |
| -} |
92 |
| - |
93 |
| -@property (nonatomic, strong) IBOutlet UIWebView* webView; |
94 |
| -@property (nonatomic, strong) IBOutlet UIBarButtonItem* closeButton; |
95 |
| -@property (nonatomic, strong) IBOutlet UILabel* addressLabel; |
96 |
| -@property (nonatomic, strong) IBOutlet UIBarButtonItem* backButton; |
97 |
| -@property (nonatomic, strong) IBOutlet UIBarButtonItem* forwardButton; |
98 |
| -@property (nonatomic, strong) IBOutlet UIActivityIndicatorView* spinner; |
99 |
| -@property (nonatomic, strong) IBOutlet UIToolbar* toolbar; |
100 |
| - |
101 |
| -@property (nonatomic, weak) id <CDVScreenOrientationDelegate> orientationDelegate; |
102 |
| -@property (nonatomic, weak) CDVInAppBrowser* navigationDelegate; |
103 |
| -@property (nonatomic) NSURL* currentURL; |
104 |
| - |
105 |
| -- (void)close; |
106 |
| -- (void)navigateTo:(NSURL*)url; |
107 |
| -- (void)showLocationBar:(BOOL)show; |
108 |
| -- (void)showToolBar:(BOOL)show : (NSString *) toolbarPosition; |
109 |
| -- (void)setCloseButtonTitle:(NSString*)title : (NSString*) colorString; |
110 |
| - |
111 |
| -- (id)initWithUserAgent:(NSString*)userAgent prevUserAgent:(NSString*)prevUserAgent browserOptions: (CDVInAppBrowserOptions*) browserOptions; |
112 |
| - |
113 |
| -@end |
114 |
| - |
115 |
| -@interface CDVInAppBrowserNavigationController : UINavigationController |
116 |
| - |
117 |
| -@property (nonatomic, weak) id <CDVScreenOrientationDelegate> orientationDelegate; |
118 |
| - |
119 |
| -@end |
0 commit comments