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