WebNetscapePluginView.h [plain text]
#if ENABLE(NETSCAPE_PLUGIN_API)
#import "WebBaseNetscapePluginView.h"
#import <WebKitLegacy/npfunctions.h>
#import <WebKitLegacy/npapi.h>
#import <wtf/HashMap.h>
#import <wtf/HashSet.h>
@class WebNetscapePluginPackage;
class PluginTimer;
class WebNetscapePluginStream;
class WebNetscapePluginEventHandler;
typedef union PluginPort {
#ifndef NP_NO_QUICKDRAW
NP_Port qdPort;
#endif
NP_CGContext cgPort;
} PluginPort;
#define WebNetscapePluginView WebNetscapePluginDocumentView
@interface WebNetscapePluginView : WebBaseNetscapePluginView<WebPluginManualLoader>
{
@package
RefPtr<WebNetscapePluginStream> _manualStream;
RetainPtr<CALayer> _pluginLayer;
unsigned _dataLengthReceived;
RetainPtr<NSError> _error;
unsigned argsCount;
char **cAttributes;
char **cValues;
NPP plugin;
NPWindow window;
NPWindow lastSetWindow;
PluginPort nPort;
PluginPort lastSetPort;
NPDrawingModel drawingModel;
NPEventModel eventModel;
#ifndef NP_NO_QUICKDRAW
GWorldPtr offscreenGWorld;
#endif
std::unique_ptr<WebNetscapePluginEventHandler> _eventHandler;
BOOL inSetWindow;
BOOL shouldStopSoon;
uint32_t currentTimerID;
std::unique_ptr<HashMap<uint32_t, std::unique_ptr<PluginTimer>>> timers;
unsigned pluginFunctionCallDepth;
int32_t specifiedHeight;
int32_t specifiedWidth;
HashSet<RefPtr<WebNetscapePluginStream>> streams;
RetainPtr<NSMapTable> _pendingFrameLoads;
BOOL _isFlash;
BOOL _isSilverlight;
}
+ (WebNetscapePluginView *)currentPluginView;
- (id)initWithFrame:(NSRect)r
pluginPackage:(WebNetscapePluginPackage *)thePluginPackage
URL:(NSURL *)URL
baseURL:(NSURL *)baseURL
MIMEType:(NSString *)MIME
attributeKeys:(NSArray *)keys
attributeValues:(NSArray *)values
loadManually:(BOOL)loadManually
element:(PassRefPtr<WebCore::HTMLPlugInElement>)element;
- (NPP)plugin;
- (void)disconnectStream:(WebNetscapePluginStream*)stream;
- (NPObject *)createPluginScriptableObject;
- (BOOL)getFormValue:(NSString **)value;
- (void)willCallPlugInFunction;
- (void)didCallPlugInFunction;
- (void)handleMouseMoved:(NSEvent *)event;
- (void)handleMouseEntered:(NSEvent *)event;
- (void)handleMouseExited:(NSEvent *)event;
@end
@interface WebNetscapePluginView (WebInternal)
- (BOOL)sendEvent:(void*)event isDrawRect:(BOOL)eventIsDrawRect;
- (NPEventModel)eventModel;
- (CALayer *)pluginLayer;
- (NPError)loadRequest:(NSURLRequest *)request inTarget:(NSString *)target withNotifyData:(void *)notifyData sendNotification:(BOOL)sendNotification;
- (NPError)getURLNotify:(const char *)URL target:(const char *)target notifyData:(void *)notifyData;
- (NPError)getURL:(const char *)URL target:(const char *)target;
- (NPError)postURLNotify:(const char *)URL target:(const char *)target len:(UInt32)len buf:(const char *)buf file:(NPBool)file notifyData:(void *)notifyData;
- (NPError)postURL:(const char *)URL target:(const char *)target len:(UInt32)len buf:(const char *)buf file:(NPBool)file;
- (NPError)newStream:(NPMIMEType)type target:(const char *)target stream:(NPStream**)stream;
- (NPError)write:(NPStream*)stream len:(SInt32)len buffer:(void *)buffer;
- (NPError)destroyStream:(NPStream*)stream reason:(NPReason)reason;
- (void)status:(const char *)message;
- (const char *)userAgent;
- (void)invalidateRect:(NPRect *)invalidRect;
- (void)invalidateRegion:(NPRegion)invalidateRegion;
- (void)forceRedraw;
- (NPError)getVariable:(NPNVariable)variable value:(void *)value;
- (NPError)setVariable:(NPPVariable)variable value:(void *)value;
- (uint32_t)scheduleTimerWithInterval:(uint32_t)interval repeat:(NPBool)repeat timerFunc:(void (*)(NPP npp, uint32_t timerID))timerFunc;
- (void)unscheduleTimer:(uint32_t)timerID;
- (NPError)popUpContextMenu:(NPMenu *)menu;
- (NPError)getVariable:(NPNURLVariable)variable forURL:(const char*)url value:(char**)value length:(uint32_t*)length;
- (NPError)setVariable:(NPNURLVariable)variable forURL:(const char*)url value:(const char*)value length:(uint32_t)length;
- (NPError)getAuthenticationInfoWithProtocol:(const char*) protocol host:(const char*)host port:(int32_t)port scheme:(const char*)scheme realm:(const char*)realm
username:(char**)username usernameLength:(uint32_t*)usernameLength
password:(char**)password passwordLength:(uint32_t*)passwordLength;
@end
#endif