From ec6fda5e89cc5d824713b911f623b011b7626881 Mon Sep 17 00:00:00 2001 From: "andersca@apple.com" Date: Wed, 9 Jul 2008 19:55:01 +0000 Subject: [PATCH] 2008-07-09 Anders Carlsson Reviewed by Darin. Make some WebPlugin and WebPluginFactory SPI public. * Plugins/WebPlugin.h: * Plugins/WebPluginPrivate.h: * Plugins/WebPluginViewFactory.h: * Plugins/WebPluginViewFactoryPrivate.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35071 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- WebKit/mac/ChangeLog | 11 +++++++ WebKit/mac/Plugins/WebPlugin.h | 36 ++++++++++++++++++++++ ...uginViewFactoryPrivate.h => WebPluginPrivate.h} | 23 ++------------ WebKit/mac/Plugins/WebPluginViewFactory.h | 9 ++++++ WebKit/mac/Plugins/WebPluginViewFactoryPrivate.h | 9 ------ 5 files changed, 59 insertions(+), 29 deletions(-) copy WebKit/mac/Plugins/{WebPluginViewFactoryPrivate.h => WebPluginPrivate.h} (61%) diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog index 91f96d145700..ae38df38b9c9 100644 --- a/WebKit/mac/ChangeLog +++ b/WebKit/mac/ChangeLog @@ -1,3 +1,14 @@ +2008-07-09 Anders Carlsson + + Reviewed by Darin. + + Make some WebPlugin and WebPluginFactory SPI public. + + * Plugins/WebPlugin.h: + * Plugins/WebPluginPrivate.h: + * Plugins/WebPluginViewFactory.h: + * Plugins/WebPluginViewFactoryPrivate.h: + 2008-07-08 Jon Honeycutt Reviewed by Anders. diff --git a/WebKit/mac/Plugins/WebPlugin.h b/WebKit/mac/Plugins/WebPlugin.h index 3163c06fccf6..35b1597ef3f4 100644 --- a/WebKit/mac/Plugins/WebPlugin.h +++ b/WebKit/mac/Plugins/WebPlugin.h @@ -92,4 +92,40 @@ */ - (id)objectForWebScript; +/*! + @method webPlugInMainResourceDidReceiveResponse: + @abstract Called on the plug-in when WebKit receives -connection:didReceiveResponse: + for the plug-in's main resource. + @discussion This method is only sent to the plug-in if the + WebPlugInShouldLoadMainResourceKey argument passed to the plug-in was NO. +*/ +- (void)webPlugInMainResourceDidReceiveResponse:(NSURLResponse *)response; + +/*! + @method webPlugInMainResourceDidReceiveData: + @abstract Called on the plug-in when WebKit recieves -connection:didReceiveData: + for the plug-in's main resource. + @discussion This method is only sent to the plug-in if the + WebPlugInShouldLoadMainResourceKey argument passed to the plug-in was NO. +*/ +- (void)webPlugInMainResourceDidReceiveData:(NSData *)data; + +/*! + @method webPlugInMainResourceDidFailWithError: + @abstract Called on the plug-in when WebKit receives -connection:didFailWithError: + for the plug-in's main resource. + @discussion This method is only sent to the plug-in if the + WebPlugInShouldLoadMainResourceKey argument passed to the plug-in was NO. +*/ +- (void)webPlugInMainResourceDidFailWithError:(NSError *)error; + +/*! + @method webPlugInMainResourceDidFinishLoading + @abstract Called on the plug-in when WebKit receives -connectionDidFinishLoading: + for the plug-in's main resource. + @discussion This method is only sent to the plug-in if the + WebPlugInShouldLoadMainResourceKey argument passed to the plug-in was NO. +*/ +- (void)webPlugInMainResourceDidFinishLoading; + @end diff --git a/WebKit/mac/Plugins/WebPluginViewFactoryPrivate.h b/WebKit/mac/Plugins/WebPluginPrivate.h similarity index 61% copy from WebKit/mac/Plugins/WebPluginViewFactoryPrivate.h copy to WebKit/mac/Plugins/WebPluginPrivate.h index b7b730287afb..56e4a3ae907f 100644 --- a/WebKit/mac/Plugins/WebPluginViewFactoryPrivate.h +++ b/WebKit/mac/Plugins/WebPluginPrivate.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005 Apple Computer, Inc. All rights reserved. + * Copyright (C) 2004 Apple Computer, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,23 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#import +@interface NSObject (WebPlugInPrivate) -typedef enum { - WebPlugInModeEmbed = 0, - WebPlugInModeFull = 1 -} WebPlugInMode; - -/*! - @constant WebPlugInModeKey REQUIRED. Number with one of the values from the WebPlugInMode enum. -*/ -extern NSString *WebPlugInModeKey; - -/*! - @constant WebPlugInShouldLoadMainResourceKey REQUIRED. NSNumber (BOOL) indicating whether the plug-in should load its - own main resource (the "src" URL, in most cases). If YES, the plug-in should load its own main resource. If NO, the - plug-in should use the data provided by WebKit. See -webPlugInMainResourceReceivedData: in WebPluginPrivate.h. - For compatibility with older versions of WebKit, the plug-in should assume that the value for - WebPlugInShouldLoadMainResourceKey is NO if it is absent from the arguments dictionary. -*/ -extern NSString *WebPlugInShouldLoadMainResourceKey; +@end diff --git a/WebKit/mac/Plugins/WebPluginViewFactory.h b/WebKit/mac/Plugins/WebPluginViewFactory.h index 565168ce1729..9be35f1d4056 100644 --- a/WebKit/mac/Plugins/WebPluginViewFactory.h +++ b/WebKit/mac/Plugins/WebPluginViewFactory.h @@ -59,6 +59,15 @@ extern NSString *WebPlugInContainerKey; extern NSString *WebPlugInContainingElementKey; /*! + @constant WebPlugInShouldLoadMainResourceKey REQUIRED. NSNumber (BOOL) indicating whether the plug-in should load its + own main resource (the "src" URL, in most cases). If YES, the plug-in should load its own main resource. If NO, the + plug-in should use the data provided by WebKit. See -webPlugInMainResourceReceivedData: in WebPluginPrivate.h. + For compatibility with older versions of WebKit, the plug-in should assume that the value for + WebPlugInShouldLoadMainResourceKey is NO if it is absent from the arguments dictionary. + */ +extern NSString *WebPlugInShouldLoadMainResourceKey; + +/*! @protocol WebPlugInViewFactory @discussion WebPlugInViewFactory are used to create the NSView for a plug-in. The principal class of the plug-in bundle must implement this protocol. diff --git a/WebKit/mac/Plugins/WebPluginViewFactoryPrivate.h b/WebKit/mac/Plugins/WebPluginViewFactoryPrivate.h index b7b730287afb..51d4283706b9 100644 --- a/WebKit/mac/Plugins/WebPluginViewFactoryPrivate.h +++ b/WebKit/mac/Plugins/WebPluginViewFactoryPrivate.h @@ -37,12 +37,3 @@ typedef enum { @constant WebPlugInModeKey REQUIRED. Number with one of the values from the WebPlugInMode enum. */ extern NSString *WebPlugInModeKey; - -/*! - @constant WebPlugInShouldLoadMainResourceKey REQUIRED. NSNumber (BOOL) indicating whether the plug-in should load its - own main resource (the "src" URL, in most cases). If YES, the plug-in should load its own main resource. If NO, the - plug-in should use the data provided by WebKit. See -webPlugInMainResourceReceivedData: in WebPluginPrivate.h. - For compatibility with older versions of WebKit, the plug-in should assume that the value for - WebPlugInShouldLoadMainResourceKey is NO if it is absent from the arguments dictionary. -*/ -extern NSString *WebPlugInShouldLoadMainResourceKey; -- 2.11.4.GIT