|
1 | 1 | // Copyright 2013 The Flutter Authors. All rights reserved. |
2 | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | 3 | // found in the LICENSE file. |
4 | | -// Autogenerated from Pigeon (v13.1.2), do not edit directly. |
| 4 | +// Autogenerated from Pigeon (v13.0.0), do not edit directly. |
5 | 5 | // See also: https://pub.dev/packages/pigeon |
6 | 6 |
|
7 | 7 | #import <Foundation/Foundation.h> |
@@ -130,6 +130,20 @@ typedef NS_ENUM(NSUInteger, FWFWKNavigationActionPolicyEnum) { |
130 | 130 | - (instancetype)initWithValue:(FWFWKNavigationActionPolicyEnum)value; |
131 | 131 | @end |
132 | 132 |
|
| 133 | +/// Mirror of WKNavigationResponsePolicy. |
| 134 | +/// |
| 135 | +/// See https://developer.apple.com/documentation/webkit/wknavigationactionpolicy?language=objc. |
| 136 | +typedef NS_ENUM(NSUInteger, FWFWKNavigationResponsePolicyEnum) { |
| 137 | + FWFWKNavigationResponsePolicyEnumAllow = 0, |
| 138 | + FWFWKNavigationResponsePolicyEnumCancel = 1, |
| 139 | +}; |
| 140 | + |
| 141 | +/// Wrapper for FWFWKNavigationResponsePolicyEnum to allow for nullability. |
| 142 | +@interface FWFWKNavigationResponsePolicyEnumBox : NSObject |
| 143 | +@property(nonatomic, assign) FWFWKNavigationResponsePolicyEnum value; |
| 144 | +- (instancetype)initWithValue:(FWFWKNavigationResponsePolicyEnum)value; |
| 145 | +@end |
| 146 | + |
133 | 147 | /// Mirror of NSHTTPCookiePropertyKey. |
134 | 148 | /// |
135 | 149 | /// See https://developer.apple.com/documentation/foundation/nshttpcookiepropertykey. |
@@ -341,8 +355,10 @@ typedef NS_ENUM(NSUInteger, FWFNSUrlCredentialPersistence) { |
341 | 355 | @class FWFWKPermissionDecisionData; |
342 | 356 | @class FWFWKMediaCaptureTypeData; |
343 | 357 | @class FWFNSUrlRequestData; |
| 358 | +@class FWFNSHttpUrlResponseData; |
344 | 359 | @class FWFWKUserScriptData; |
345 | 360 | @class FWFWKNavigationActionData; |
| 361 | +@class FWFWKNavigationResponseData; |
346 | 362 | @class FWFWKFrameInfoData; |
347 | 363 | @class FWFNSErrorData; |
348 | 364 | @class FWFWKScriptMessageData; |
@@ -430,6 +446,16 @@ typedef NS_ENUM(NSUInteger, FWFNSUrlCredentialPersistence) { |
430 | 446 | @property(nonatomic, copy) NSDictionary<NSString *, NSString *> *allHttpHeaderFields; |
431 | 447 | @end |
432 | 448 |
|
| 449 | +/// Mirror of NSURLResponse. |
| 450 | +/// |
| 451 | +/// See https://developer.apple.com/documentation/foundation/nshttpurlresponse?language=objc. |
| 452 | +@interface FWFNSHttpUrlResponseData : NSObject |
| 453 | +/// `init` unavailable to enforce nonnull fields, see the `make` class method. |
| 454 | +- (instancetype)init NS_UNAVAILABLE; |
| 455 | ++ (instancetype)makeWithStatusCode:(NSInteger)statusCode; |
| 456 | +@property(nonatomic, assign) NSInteger statusCode; |
| 457 | +@end |
| 458 | + |
433 | 459 | /// Mirror of WKUserScript. |
434 | 460 | /// |
435 | 461 | /// See https://developer.apple.com/documentation/webkit/wkuserscript?language=objc. |
@@ -458,6 +484,18 @@ typedef NS_ENUM(NSUInteger, FWFNSUrlCredentialPersistence) { |
458 | 484 | @property(nonatomic, assign) FWFWKNavigationType navigationType; |
459 | 485 | @end |
460 | 486 |
|
| 487 | +/// Mirror of WKNavigationResponse. |
| 488 | +/// |
| 489 | +/// See https://developer.apple.com/documentation/webkit/wknavigationresponse. |
| 490 | +@interface FWFWKNavigationResponseData : NSObject |
| 491 | +/// `init` unavailable to enforce nonnull fields, see the `make` class method. |
| 492 | +- (instancetype)init NS_UNAVAILABLE; |
| 493 | ++ (instancetype)makeWithResponse:(FWFNSHttpUrlResponseData *)response |
| 494 | + forMainFrame:(BOOL)forMainFrame; |
| 495 | +@property(nonatomic, strong) FWFNSHttpUrlResponseData *response; |
| 496 | +@property(nonatomic, assign) BOOL forMainFrame; |
| 497 | +@end |
| 498 | + |
461 | 499 | /// Mirror of WKFrameInfo. |
462 | 500 | /// |
463 | 501 | /// See https://developer.apple.com/documentation/webkit/wkframeinfo?language=objc. |
@@ -778,6 +816,15 @@ NSObject<FlutterMessageCodec> *FWFWKNavigationDelegateFlutterApiGetCodec(void); |
778 | 816 | (void (^)(FWFWKNavigationActionPolicyEnumData |
779 | 817 | *_Nullable, |
780 | 818 | FlutterError *_Nullable))completion; |
| 819 | +- (void)decidePolicyForNavigationResponseForDelegateWithIdentifier:(NSInteger)identifier |
| 820 | + webViewIdentifier:(NSInteger)webViewIdentifier |
| 821 | + navigationResponse:(FWFWKNavigationResponseData *) |
| 822 | + navigationResponse |
| 823 | + completion: |
| 824 | + (void (^)( |
| 825 | + FWFWKNavigationResponsePolicyEnumBox |
| 826 | + *_Nullable, |
| 827 | + FlutterError *_Nullable))completion; |
781 | 828 | - (void)didFailNavigationForDelegateWithIdentifier:(NSInteger)identifier |
782 | 829 | webViewIdentifier:(NSInteger)webViewIdentifier |
783 | 830 | error:(FWFNSErrorData *)error |
|
0 commit comments