WKActionMenuController.h [plain text]
#ifndef WKActionMenuController_h
#define WKActionMenuController_h
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
#import "ActionMenuHitTestResult.h"
#import "WKActionMenuItemTypes.h"
#import "WKActionMenuTypes.h"
#import <AppKit/NSSharingService.h>
#import <wtf/RetainPtr.h>
namespace WebKit {
class WebPageProxy;
enum class ActionMenuState {
None = 0,
Pending,
TimedOut,
Ready
};
}
@class DDActionContext;
@class WKView;
@interface WKActionMenuController : NSObject <NSMenuDelegate> {
@private
WebKit::WebPageProxy *_page;
WKView *_wkView;
WebKit::ActionMenuState _state;
WebKit::ActionMenuHitTestResult _hitTestResult;
RefPtr<API::Object> _userData;
_WKActionMenuType _type;
RetainPtr<NSSharingServicePicker> _sharingServicePicker;
BOOL _hasActivatedActionContext;
RetainPtr<DDActionContext> _currentActionContext;
}
- (instancetype)initWithPage:(WebKit::WebPageProxy&)page view:(WKView *)wkView;
- (void)willDestroyView:(WKView *)view;
- (void)prepareForMenu:(NSMenu *)menu withEvent:(NSEvent *)event;
- (void)willOpenMenu:(NSMenu *)menu withEvent:(NSEvent *)event;
- (void)didCloseMenu:(NSMenu *)menu withEvent:(NSEvent *)event;
- (void)wkView:(WKView *)wkView willHandleMouseDown:(NSEvent *)event;
- (void)didPerformActionMenuHitTest:(const WebKit::ActionMenuHitTestResult&)hitTestResult userData:(API::Object*)userData;
@end
#endif // PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
#endif // WKActionMenuController_h