r=vidur, av
a=brendan
bug=49525
This simple fix just adds parameters to an existing method in an XPCOM
safe way, by defining a new method at the end of the interface
definition with the additional parameters.
Original method:
NS_IMETHOD
GetURL(nsISupports* pluginInst,
const char* url,
const char* target = NULL,
nsIPluginStreamListener* streamListener = NULL,
const char* altHost = NULL,
const char* referrer = NULL,
PRBool forceJSEnabled = PR_FALSE) = 0;
New method:
NS_IMETHOD
GetURLWithHeaders(nsISupports* pluginInst,
const char* url,
const char* target = NULL,
nsIPluginStreamListener* streamListener = NULL,
const char* altHost = NULL,
const char* referrer = NULL,
PRBool forceJSEnabled = PR_FALSE,
PRUint32 getHeadersLength = 0,
const char* getHeaders = NULL) = 0;
I have modified nsPluginHostImpl.h to include this new method, and
modified nsPluginHostImpl.cpp so that its GetURL calls GetURLWithHeaders
with null values for the last two params.
M modules/plugin/public/nsIPluginManager.h
M modules/plugin/nglsrc/nsPluginHostImpl.cpp
M modules/plugin/nglsrc/nsPluginHostImpl.h
git-svn-id: svn://10.0.0.236/trunk@79207 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -162,10 +162,13 @@ public:
|
||||
* URLs, even if the user currently has JavaScript disabled (usually
|
||||
* specify PR_FALSE)
|
||||
* @param postHeadersLength - the length of postHeaders (if non-NULL)
|
||||
* @param postHeaders - the headers to POST. NULL specifies that there
|
||||
* are no post headers
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
|
||||
* @param postHeaders - the headers to POST. Must be in the form of
|
||||
* "HeaderName: HeaderValue\r\n". Each header, including the last,
|
||||
* must be followed by "\r\n". NULL specifies that there are no
|
||||
* post headers
|
||||
|
||||
* @result - NS_OK if this operation was successful */
|
||||
|
||||
NS_IMETHOD
|
||||
PostURL(nsISupports* pluginInst,
|
||||
@@ -221,6 +224,35 @@ public:
|
||||
|
||||
NS_IMETHOD
|
||||
UnregisterPlugin(REFNSIID aCID) = 0;
|
||||
|
||||
/**
|
||||
* Fetches a URL, with Headers
|
||||
|
||||
* @see GetURL. Identical except for additional params headers and
|
||||
* headersLen
|
||||
|
||||
* @param getHeadersLength - the length of getHeaders (if non-NULL)
|
||||
|
||||
* @param getHeaders - the headers to GET. Must be in the form of
|
||||
* "HeaderName: HeaderValue\r\n". Each header, including the last,
|
||||
* must be followed by "\r\n". NULL specifies that there are no
|
||||
* get headers
|
||||
|
||||
* @result - NS_OK if this operation was successful
|
||||
|
||||
*/
|
||||
|
||||
NS_IMETHOD
|
||||
GetURLWithHeaders(nsISupports* pluginInst,
|
||||
const char* url,
|
||||
const char* target = NULL,
|
||||
nsIPluginStreamListener* streamListener = NULL,
|
||||
const char* altHost = NULL,
|
||||
const char* referrer = NULL,
|
||||
PRBool forceJSEnabled = PR_FALSE,
|
||||
PRUint32 getHeadersLength = 0,
|
||||
const char* getHeaders = NULL) = 0;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user