This repository was archived by the owner on Feb 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy path_WKWebExtensionWindow.h
48 lines (30 loc) · 1.92 KB
/
_WKWebExtensionWindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#import <Foundation/Foundation.h>
@class _WKWebExtensionContext;
@protocol _WKWebExtensionTab;
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, _WKWebExtensionWindowType) {
_WKWebExtensionWindowTypeNormal,
_WKWebExtensionWindowTypePopup,
} API_AVAILABLE(macos(14.4), ios(16.4));
typedef NS_ENUM(NSInteger, _WKWebExtensionWindowState) {
_WKWebExtensionWindowStateNormal,
_WKWebExtensionWindowStateMinimized,
_WKWebExtensionWindowStateMaximized,
_WKWebExtensionWindowStateFullscreen,
} API_AVAILABLE(macos(14.4), ios(16.4));
API_AVAILABLE(macos(14.4), ios(16.4))
@protocol _WKWebExtensionWindow <NSObject>
@optional
- (NSArray<id <_WKWebExtensionTab>> *)tabsForWebExtensionContext:(_WKWebExtensionContext *)context;
- (nullable id <_WKWebExtensionTab>)activeTabForWebExtensionContext:(_WKWebExtensionContext *)context;
- (_WKWebExtensionWindowType)windowTypeForWebExtensionContext:(_WKWebExtensionContext *)context;
- (_WKWebExtensionWindowState)windowStateForWebExtensionContext:(_WKWebExtensionContext *)context;
- (void)setWindowState:(_WKWebExtensionWindowState)state forWebExtensionContext:(_WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler;
- (BOOL)isUsingPrivateBrowsingForWebExtensionContext:(_WKWebExtensionContext *)context;
- (CGRect)screenFrameForWebExtensionContext:(_WKWebExtensionContext *)context;
- (CGRect)frameForWebExtensionContext:(_WKWebExtensionContext *)context;
- (void)setFrame:(CGRect)frame forWebExtensionContext:(_WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler;
- (void)focusForWebExtensionContext:(_WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler;
- (void)closeForWebExtensionContext:(_WKWebExtensionContext *)context completionHandler:(void (^)(NSError * _Nullable error))completionHandler;
@end
NS_ASSUME_NONNULL_END