Skip to content

Commit 59103d6

Browse files
bparrishMinesmauricioluz
authored andcommitted
[webview_flutter_wkwebview] Implement Dart side of Flutter Apis (flutter#5933)
1 parent 45691a4 commit 59103d6

14 files changed

+2187
-105
lines changed

packages/webview_flutter/webview_flutter_wkwebview/ios/Classes/FWFGeneratedWebKitApis.h

+110-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2013 The Flutter Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4-
// Autogenerated from Pigeon (v3.1.2), do not edit directly.
4+
// Autogenerated from Pigeon (v3.1.4), do not edit directly.
55
// See also: https://pub.dev/packages/pigeon
66
#import <Foundation/Foundation.h>
77
@protocol FlutterBinaryMessenger;
@@ -79,12 +79,18 @@ typedef NS_ENUM(NSUInteger, FWFNSHttpCookiePropertyKeyEnum) {
7979
};
8080

8181
@class FWFNSKeyValueObservingOptionsEnumData;
82+
@class FWFNSKeyValueChangeKeyEnumData;
8283
@class FWFWKUserScriptInjectionTimeEnumData;
8384
@class FWFWKAudiovisualMediaTypeEnumData;
8485
@class FWFWKWebsiteDataTypeEnumData;
86+
@class FWFWKNavigationActionPolicyEnumData;
8587
@class FWFNSHttpCookiePropertyKeyEnumData;
8688
@class FWFNSUrlRequestData;
8789
@class FWFWKUserScriptData;
90+
@class FWFWKNavigationActionData;
91+
@class FWFWKFrameInfoData;
92+
@class FWFNSErrorData;
93+
@class FWFWKScriptMessageData;
8894
@class FWFNSHttpCookieData;
8995

9096
@interface FWFNSKeyValueObservingOptionsEnumData : NSObject
@@ -94,6 +100,13 @@ typedef NS_ENUM(NSUInteger, FWFNSHttpCookiePropertyKeyEnum) {
94100
@property(nonatomic, assign) FWFNSKeyValueObservingOptionsEnum value;
95101
@end
96102

103+
@interface FWFNSKeyValueChangeKeyEnumData : NSObject
104+
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
105+
- (instancetype)init NS_UNAVAILABLE;
106+
+ (instancetype)makeWithValue:(FWFNSKeyValueChangeKeyEnum)value;
107+
@property(nonatomic, assign) FWFNSKeyValueChangeKeyEnum value;
108+
@end
109+
97110
@interface FWFWKUserScriptInjectionTimeEnumData : NSObject
98111
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
99112
- (instancetype)init NS_UNAVAILABLE;
@@ -115,6 +128,13 @@ typedef NS_ENUM(NSUInteger, FWFNSHttpCookiePropertyKeyEnum) {
115128
@property(nonatomic, assign) FWFWKWebsiteDataTypeEnum value;
116129
@end
117130

131+
@interface FWFWKNavigationActionPolicyEnumData : NSObject
132+
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
133+
- (instancetype)init NS_UNAVAILABLE;
134+
+ (instancetype)makeWithValue:(FWFWKNavigationActionPolicyEnum)value;
135+
@property(nonatomic, assign) FWFWKNavigationActionPolicyEnum value;
136+
@end
137+
118138
@interface FWFNSHttpCookiePropertyKeyEnumData : NSObject
119139
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
120140
- (instancetype)init NS_UNAVAILABLE;
@@ -146,6 +166,41 @@ typedef NS_ENUM(NSUInteger, FWFNSHttpCookiePropertyKeyEnum) {
146166
@property(nonatomic, strong) NSNumber *isMainFrameOnly;
147167
@end
148168

169+
@interface FWFWKNavigationActionData : NSObject
170+
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
171+
- (instancetype)init NS_UNAVAILABLE;
172+
+ (instancetype)makeWithRequest:(FWFNSUrlRequestData *)request
173+
targetFrame:(FWFWKFrameInfoData *)targetFrame;
174+
@property(nonatomic, strong) FWFNSUrlRequestData *request;
175+
@property(nonatomic, strong) FWFWKFrameInfoData *targetFrame;
176+
@end
177+
178+
@interface FWFWKFrameInfoData : NSObject
179+
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
180+
- (instancetype)init NS_UNAVAILABLE;
181+
+ (instancetype)makeWithIsMainFrame:(NSNumber *)isMainFrame;
182+
@property(nonatomic, strong) NSNumber *isMainFrame;
183+
@end
184+
185+
@interface FWFNSErrorData : NSObject
186+
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
187+
- (instancetype)init NS_UNAVAILABLE;
188+
+ (instancetype)makeWithCode:(NSNumber *)code
189+
domain:(NSString *)domain
190+
localizedDescription:(NSString *)localizedDescription;
191+
@property(nonatomic, strong) NSNumber *code;
192+
@property(nonatomic, copy) NSString *domain;
193+
@property(nonatomic, copy) NSString *localizedDescription;
194+
@end
195+
196+
@interface FWFWKScriptMessageData : NSObject
197+
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
198+
- (instancetype)init NS_UNAVAILABLE;
199+
+ (instancetype)makeWithName:(NSString *)name body:(id)body;
200+
@property(nonatomic, copy) NSString *name;
201+
@property(nonatomic, strong) id body;
202+
@end
203+
149204
@interface FWFNSHttpCookieData : NSObject
150205
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
151206
- (instancetype)init NS_UNAVAILABLE;
@@ -298,6 +353,16 @@ extern void FWFWKScriptMessageHandlerHostApiSetup(
298353
id<FlutterBinaryMessenger> binaryMessenger,
299354
NSObject<FWFWKScriptMessageHandlerHostApi> *_Nullable api);
300355

356+
/// The codec used by FWFWKScriptMessageHandlerFlutterApi.
357+
NSObject<FlutterMessageCodec> *FWFWKScriptMessageHandlerFlutterApiGetCodec(void);
358+
359+
@interface FWFWKScriptMessageHandlerFlutterApi : NSObject
360+
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger;
361+
- (void)didReceiveScriptMessageForHandlerWithIdentifier:(NSNumber *)identifier
362+
userContentControllerIdentifier:(NSNumber *)userContentControllerIdentifier
363+
message:(FWFWKScriptMessageData *)message
364+
completion:(void (^)(NSError *_Nullable))completion;
365+
@end
301366
/// The codec used by FWFWKNavigationDelegateHostApi.
302367
NSObject<FlutterMessageCodec> *FWFWKNavigationDelegateHostApiGetCodec(void);
303368

@@ -318,6 +383,33 @@ NSObject<FlutterMessageCodec> *FWFWKNavigationDelegateFlutterApiGetCodec(void);
318383
webViewIdentifier:(NSNumber *)webViewIdentifier
319384
URL:(nullable NSString *)url
320385
completion:(void (^)(NSError *_Nullable))completion;
386+
- (void)didStartProvisionalNavigationForDelegateWithIdentifier:(NSNumber *)identifier
387+
webViewIdentifier:(NSNumber *)webViewIdentifier
388+
URL:(nullable NSString *)url
389+
completion:
390+
(void (^)(NSError *_Nullable))completion;
391+
- (void)
392+
decidePolicyForNavigationActionForDelegateWithIdentifier:(NSNumber *)identifier
393+
webViewIdentifier:(NSNumber *)webViewIdentifier
394+
navigationAction:
395+
(FWFWKNavigationActionData *)navigationAction
396+
completion:
397+
(void (^)(FWFWKNavigationActionPolicyEnumData
398+
*_Nullable,
399+
NSError *_Nullable))completion;
400+
- (void)didFailNavigationForDelegateWithIdentifier:(NSNumber *)identifier
401+
webViewIdentifier:(NSNumber *)webViewIdentifier
402+
error:(FWFNSErrorData *)error
403+
completion:(void (^)(NSError *_Nullable))completion;
404+
- (void)didFailProvisionalNavigationForDelegateWithIdentifier:(NSNumber *)identifier
405+
webViewIdentifier:(NSNumber *)webViewIdentifier
406+
error:(FWFNSErrorData *)error
407+
completion:
408+
(void (^)(NSError *_Nullable))completion;
409+
- (void)webViewWebContentProcessDidTerminateForDelegateWithIdentifier:(NSNumber *)identifier
410+
webViewIdentifier:(NSNumber *)webViewIdentifier
411+
completion:(void (^)(NSError *_Nullable))
412+
completion;
321413
@end
322414
/// The codec used by FWFNSObjectHostApi.
323415
NSObject<FlutterMessageCodec> *FWFNSObjectHostApiGetCodec(void);
@@ -345,6 +437,12 @@ NSObject<FlutterMessageCodec> *FWFNSObjectFlutterApiGetCodec(void);
345437

346438
@interface FWFNSObjectFlutterApi : NSObject
347439
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger;
440+
- (void)observeValueForObjectWithIdentifier:(NSNumber *)identifier
441+
keyPath:(NSString *)keyPath
442+
objectIdentifier:(NSNumber *)objectIdentifier
443+
changeKeys:(NSArray<FWFNSKeyValueChangeKeyEnumData *> *)changeKeys
444+
changeValues:(NSArray<id> *)changeValues
445+
completion:(void (^)(NSError *_Nullable))completion;
348446
@end
349447
/// The codec used by FWFWKWebViewHostApi.
350448
NSObject<FlutterMessageCodec> *FWFWKWebViewHostApiGetCodec(void);
@@ -420,6 +518,17 @@ NSObject<FlutterMessageCodec> *FWFWKUIDelegateHostApiGetCodec(void);
420518
extern void FWFWKUIDelegateHostApiSetup(id<FlutterBinaryMessenger> binaryMessenger,
421519
NSObject<FWFWKUIDelegateHostApi> *_Nullable api);
422520

521+
/// The codec used by FWFWKUIDelegateFlutterApi.
522+
NSObject<FlutterMessageCodec> *FWFWKUIDelegateFlutterApiGetCodec(void);
523+
524+
@interface FWFWKUIDelegateFlutterApi : NSObject
525+
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger;
526+
- (void)onCreateWebViewForDelegateWithIdentifier:(NSNumber *)identifier
527+
webViewIdentifier:(NSNumber *)webViewIdentifier
528+
configurationIdentifier:(NSNumber *)configurationIdentifier
529+
navigationAction:(FWFWKNavigationActionData *)navigationAction
530+
completion:(void (^)(NSError *_Nullable))completion;
531+
@end
423532
/// The codec used by FWFWKHttpCookieStoreHostApi.
424533
NSObject<FlutterMessageCodec> *FWFWKHttpCookieStoreHostApiGetCodec(void);
425534

0 commit comments

Comments
 (0)