remove nsIPluginManager/nsIPluginManager2

RESOLVED FIXED

Status

()

Core
Plug-ins
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Josh Aas, Assigned: Josh Aas)

Tracking

({dev-doc-complete})

Trunk
dev-doc-complete
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

67.98 KB, patch
jst
: review+
Details | Diff | Splinter Review
(Assignee)

Description

9 years ago
Created attachment 384213 [details] [diff] [review]
fix v1.0

We should remove nsIPluginManager/nsIPluginManager2, merge anything we actually use from them into nsIPluginHost. This removes a bunch of unnecessary complexity.
(Assignee)

Updated

9 years ago
Attachment #384213 - Flags: superreview?(roc)
I know nothing about these interfaces. Wouldn't jst be a better reviewer?
(Assignee)

Updated

9 years ago
Attachment #384213 - Flags: superreview?(roc) → superreview?(jst)
(Assignee)

Comment 2

9 years ago
Created attachment 385117 [details] [diff] [review]
fix v1.1

Updated to current trunk, improve a few things.
Attachment #384213 - Attachment is obsolete: true
Attachment #385117 - Flags: superreview?(jst)
Attachment #384213 - Flags: superreview?(jst)

Updated

9 years ago
Attachment #385117 - Flags: superreview?(jst)
Attachment #385117 - Flags: superreview+
Attachment #385117 - Flags: review+
(Assignee)

Comment 3

9 years ago
pushed to mozilla-central

http://hg.mozilla.org/mozilla-central/rev/f5f2c8fe6387
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Keywords: dev-doc-needed
Keywords: dev-doc-needed → dev-doc-complete

Comment 5

9 years ago
Comment on attachment 385117 [details] [diff] [review]
fix v1.1

>+  /**
>+   * Fetches a URL.
>+   *
>+   * (Corresponds to NPN_GetURL and NPN_GetURLNotify.)
>+   *
>+   * @param pluginInst - the plugin making the request. If NULL, the URL
>+   *  is fetched in the background.
>+   * @param url - the URL to fetch
>+   * @param target - the target window into which to load the URL, or NULL if
>+   *  the data should be returned to the plugin via streamListener.
>+   * @param streamListener - a stream listener to be used to return data to
>+   *  the plugin. May be NULL if target is not NULL.
>+   * @param altHost - an IP-address string that will be used instead of the 
>+   *  host specified in the URL. This is used to prevent DNS-spoofing 
>+   *  attacks. Can be defaulted to NULL meaning use the host in the URL.
>+   * @param referrer - the referring URL (may be NULL)
>+   * @param forceJSEnabled - forces JavaScript to be enabled for 'javascript:'
>+   *  URLs, even if the user currently has JavaScript disabled (usually 
>+   *  specify PR_FALSE) 
>+   * @result - NS_OK if this operation was successful
>+   */
>+%{C++
>+  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;
>+%}
>+
>+  /**
>+   * Posts to a URL with post data and/or post headers.
>+   *
>+   * (Corresponds to NPN_PostURL and NPN_PostURLNotify.)
>+   *
>+   * @param pluginInst - the plugin making the request. If NULL, the URL
>+   *  is fetched in the background.
>+   * @param url - the URL to fetch
>+   * @param postDataLength - the length of postData (if non-NULL)
>+   * @param postData - the data to POST. NULL specifies that there is not post
>+   *  data
>+   * @param isFile - whether the postData specifies the name of a file to 
>+   *  post instead of data. The file will be deleted afterwards.
>+   * @param target - the target window into which to load the URL, or NULL if
>+   *  the data should be returned to the plugin via streamListener.
>+   * @param streamListener - a stream listener to be used to return data to
>+   *  the plugin. May be NULL if target is not NULL.
>+   * @param altHost - an IP-address string that will be used instead of the 
>+   *  host specified in the URL. This is used to prevent DNS-spoofing 
>+   *  attacks. Can be defaulted to NULL meaning use the host in the URL.
>+   * @param referrer - the referring URL (may be NULL)
>+   * @param forceJSEnabled - forces JavaScript to be enabled for 'javascript:'
>+   *  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. 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
>+   */
>+%{C++
>+  NS_IMETHOD
>+  PostURL(nsISupports* pluginInst,
>+    const char* url,
>+    PRUint32 postDataLen,
>+    const char* postData,
>+    PRBool isFile = PR_FALSE,
>+    const char* target = NULL,
>+    nsIPluginStreamListener* streamListener = NULL,
>+    const char* altHost = NULL,
>+    const char* referrer = NULL,
>+    PRBool forceJSEnabled = PR_FALSE,
>+    PRUint32 postHeadersLength = 0,
>+    const char* postHeaders = NULL) = 0;
>+%}
>+
>+  /**
>+   * Returns the proxy info for a given URL. The caller is required to
>+   * free the resulting memory with nsIMalloc::Free. The result will be in the
>+   * following format
>+   * 
>+   *   i)   "DIRECT"  -- no proxy
>+   *   ii)  "PROXY xxx.xxx.xxx.xxx"   -- use proxy
>+   *   iii) "SOCKS xxx.xxx.xxx.xxx"  -- use SOCKS
>+   *   iv)  Mixed. e.g. "PROXY 111.111.111.111;PROXY 112.112.112.112",
>+   *                    "PROXY 111.111.111.111;SOCKS 112.112.112.112"....
>+   *
>+   * Which proxy/SOCKS to use is determined by the plugin.
>+   */
>+  void findProxyForURL(in string aURL, out string aResult);
>+   
>+  [noscript] void UserAgent(in nativeChar resultingAgentString);
A scriptable method was added after a C++ block defining virtual methods. Won't that means that the xpt will not match the actual vtable layout and attempting to call that method through NS_InvokeByIndex will fail? The idl compiler unfortunately does not warn you about this.
(Assignee)

Comment 6

9 years ago
I filed bug 542712 on checking the vtable issue.
You need to log in before you can comment on or make changes to this bug.