Skip to content

Commit

Permalink
[webview_flutter_wkwebview] Implement Dart side of Flutter Apis (flut…
Browse files Browse the repository at this point in the history
  • Loading branch information
bparrishMines authored and mvanbeusekom committed Jul 19, 2022
1 parent b8cb737 commit 4a49156
Show file tree
Hide file tree
Showing 14 changed files with 2,187 additions and 105 deletions.
@@ -1,7 +1,7 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Autogenerated from Pigeon (v3.1.2), do not edit directly.
// Autogenerated from Pigeon (v3.1.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon
#import <Foundation/Foundation.h>
@protocol FlutterBinaryMessenger;
Expand Down Expand Up @@ -79,12 +79,18 @@ typedef NS_ENUM(NSUInteger, FWFNSHttpCookiePropertyKeyEnum) {
};

@class FWFNSKeyValueObservingOptionsEnumData;
@class FWFNSKeyValueChangeKeyEnumData;
@class FWFWKUserScriptInjectionTimeEnumData;
@class FWFWKAudiovisualMediaTypeEnumData;
@class FWFWKWebsiteDataTypeEnumData;
@class FWFWKNavigationActionPolicyEnumData;
@class FWFNSHttpCookiePropertyKeyEnumData;
@class FWFNSUrlRequestData;
@class FWFWKUserScriptData;
@class FWFWKNavigationActionData;
@class FWFWKFrameInfoData;
@class FWFNSErrorData;
@class FWFWKScriptMessageData;
@class FWFNSHttpCookieData;

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

@interface FWFNSKeyValueChangeKeyEnumData : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)makeWithValue:(FWFNSKeyValueChangeKeyEnum)value;
@property(nonatomic, assign) FWFNSKeyValueChangeKeyEnum value;
@end

@interface FWFWKUserScriptInjectionTimeEnumData : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
Expand All @@ -115,6 +128,13 @@ typedef NS_ENUM(NSUInteger, FWFNSHttpCookiePropertyKeyEnum) {
@property(nonatomic, assign) FWFWKWebsiteDataTypeEnum value;
@end

@interface FWFWKNavigationActionPolicyEnumData : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)makeWithValue:(FWFWKNavigationActionPolicyEnum)value;
@property(nonatomic, assign) FWFWKNavigationActionPolicyEnum value;
@end

@interface FWFNSHttpCookiePropertyKeyEnumData : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
Expand Down Expand Up @@ -146,6 +166,41 @@ typedef NS_ENUM(NSUInteger, FWFNSHttpCookiePropertyKeyEnum) {
@property(nonatomic, strong) NSNumber *isMainFrameOnly;
@end

@interface FWFWKNavigationActionData : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)makeWithRequest:(FWFNSUrlRequestData *)request
targetFrame:(FWFWKFrameInfoData *)targetFrame;
@property(nonatomic, strong) FWFNSUrlRequestData *request;
@property(nonatomic, strong) FWFWKFrameInfoData *targetFrame;
@end

@interface FWFWKFrameInfoData : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)makeWithIsMainFrame:(NSNumber *)isMainFrame;
@property(nonatomic, strong) NSNumber *isMainFrame;
@end

@interface FWFNSErrorData : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)makeWithCode:(NSNumber *)code
domain:(NSString *)domain
localizedDescription:(NSString *)localizedDescription;
@property(nonatomic, strong) NSNumber *code;
@property(nonatomic, copy) NSString *domain;
@property(nonatomic, copy) NSString *localizedDescription;
@end

@interface FWFWKScriptMessageData : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)makeWithName:(NSString *)name body:(id)body;
@property(nonatomic, copy) NSString *name;
@property(nonatomic, strong) id body;
@end

@interface FWFNSHttpCookieData : NSObject
/// `init` unavailable to enforce nonnull fields, see the `make` class method.
- (instancetype)init NS_UNAVAILABLE;
Expand Down Expand Up @@ -298,6 +353,16 @@ extern void FWFWKScriptMessageHandlerHostApiSetup(
id<FlutterBinaryMessenger> binaryMessenger,
NSObject<FWFWKScriptMessageHandlerHostApi> *_Nullable api);

/// The codec used by FWFWKScriptMessageHandlerFlutterApi.
NSObject<FlutterMessageCodec> *FWFWKScriptMessageHandlerFlutterApiGetCodec(void);

@interface FWFWKScriptMessageHandlerFlutterApi : NSObject
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger;
- (void)didReceiveScriptMessageForHandlerWithIdentifier:(NSNumber *)identifier
userContentControllerIdentifier:(NSNumber *)userContentControllerIdentifier
message:(FWFWKScriptMessageData *)message
completion:(void (^)(NSError *_Nullable))completion;
@end
/// The codec used by FWFWKNavigationDelegateHostApi.
NSObject<FlutterMessageCodec> *FWFWKNavigationDelegateHostApiGetCodec(void);

Expand All @@ -318,6 +383,33 @@ NSObject<FlutterMessageCodec> *FWFWKNavigationDelegateFlutterApiGetCodec(void);
webViewIdentifier:(NSNumber *)webViewIdentifier
URL:(nullable NSString *)url
completion:(void (^)(NSError *_Nullable))completion;
- (void)didStartProvisionalNavigationForDelegateWithIdentifier:(NSNumber *)identifier
webViewIdentifier:(NSNumber *)webViewIdentifier
URL:(nullable NSString *)url
completion:
(void (^)(NSError *_Nullable))completion;
- (void)
decidePolicyForNavigationActionForDelegateWithIdentifier:(NSNumber *)identifier
webViewIdentifier:(NSNumber *)webViewIdentifier
navigationAction:
(FWFWKNavigationActionData *)navigationAction
completion:
(void (^)(FWFWKNavigationActionPolicyEnumData
*_Nullable,
NSError *_Nullable))completion;
- (void)didFailNavigationForDelegateWithIdentifier:(NSNumber *)identifier
webViewIdentifier:(NSNumber *)webViewIdentifier
error:(FWFNSErrorData *)error
completion:(void (^)(NSError *_Nullable))completion;
- (void)didFailProvisionalNavigationForDelegateWithIdentifier:(NSNumber *)identifier
webViewIdentifier:(NSNumber *)webViewIdentifier
error:(FWFNSErrorData *)error
completion:
(void (^)(NSError *_Nullable))completion;
- (void)webViewWebContentProcessDidTerminateForDelegateWithIdentifier:(NSNumber *)identifier
webViewIdentifier:(NSNumber *)webViewIdentifier
completion:(void (^)(NSError *_Nullable))
completion;
@end
/// The codec used by FWFNSObjectHostApi.
NSObject<FlutterMessageCodec> *FWFNSObjectHostApiGetCodec(void);
Expand Down Expand Up @@ -345,6 +437,12 @@ NSObject<FlutterMessageCodec> *FWFNSObjectFlutterApiGetCodec(void);

@interface FWFNSObjectFlutterApi : NSObject
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger;
- (void)observeValueForObjectWithIdentifier:(NSNumber *)identifier
keyPath:(NSString *)keyPath
objectIdentifier:(NSNumber *)objectIdentifier
changeKeys:(NSArray<FWFNSKeyValueChangeKeyEnumData *> *)changeKeys
changeValues:(NSArray<id> *)changeValues
completion:(void (^)(NSError *_Nullable))completion;
@end
/// The codec used by FWFWKWebViewHostApi.
NSObject<FlutterMessageCodec> *FWFWKWebViewHostApiGetCodec(void);
Expand Down Expand Up @@ -420,6 +518,17 @@ NSObject<FlutterMessageCodec> *FWFWKUIDelegateHostApiGetCodec(void);
extern void FWFWKUIDelegateHostApiSetup(id<FlutterBinaryMessenger> binaryMessenger,
NSObject<FWFWKUIDelegateHostApi> *_Nullable api);

/// The codec used by FWFWKUIDelegateFlutterApi.
NSObject<FlutterMessageCodec> *FWFWKUIDelegateFlutterApiGetCodec(void);

@interface FWFWKUIDelegateFlutterApi : NSObject
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger;
- (void)onCreateWebViewForDelegateWithIdentifier:(NSNumber *)identifier
webViewIdentifier:(NSNumber *)webViewIdentifier
configurationIdentifier:(NSNumber *)configurationIdentifier
navigationAction:(FWFWKNavigationActionData *)navigationAction
completion:(void (^)(NSError *_Nullable))completion;
@end
/// The codec used by FWFWKHttpCookieStoreHostApi.
NSObject<FlutterMessageCodec> *FWFWKHttpCookieStoreHostApiGetCodec(void);

Expand Down

0 comments on commit 4a49156

Please sign in to comment.