Closed Bug 1294589 Opened 9 years ago Closed 9 years ago

Support calling non-scriptable loadURI in the base mailnews URL

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 51.0

People

(Reporter: rkent, Assigned: rkent)

Details

Attachments

(1 file)

SkinkGlue (the precursor to JsAccount) has an extensive service base class, but normal account service classes (like nsImapService) do not have a common base class. So I did not add it in my first JsAccount version. But now I see why I needed it for TweeQuilla (the demo JS-only account type). Calls to key methods in nsIMsgMessageService, for example DisplayMessage, pass in a nsISupports aDisplayConsumer which may be an nsIDocShell. Unfortunately key methods in nsIDocShell are non-scriptable (like loadUri). That means that a JS-only service implementation is unable to handle them. So we need a C++ base class in JsAccount for nsIMsgMessageService that provides means to call these doc shells.
Or maybe I can just add a method to nsIMsgMailNewsUrl to load it into a doc shell.
Summary: Add a service base class to JsAccount → Support calling non-scriptable loadURI in the base mailnews URL
Assignee: nobody → rkent
Status: NEW → ASSIGNED
Attachment #8780394 - Flags: review?(jorgk)
Comment on attachment 8780394 [details] [diff] [review] add a loadURI method to the url Review of attachment 8780394 [details] [diff] [review]: ----------------------------------------------------------------- This doesn't do any damage ;-) r=jorgk. ::: mailnews/base/public/nsIMsgMailNewsUrl.idl @@ +98,5 @@ > /// Returns true if the URI is for a message (e.g., imap-message://) > readonly attribute boolean isMessageUri; > + > + /** > + * Loads the URI in a docshell. This will give priority to loading the Nit: I think double spaces after a full stop are out of fashion. Here and a few times below. Also not handled consistently. @@ +103,5 @@ > + * URI in the passed-in docshell. If it can't be loaded there > + * however, the URL dispatcher will go through its normal process of content > + * loading. > + * > + * @param docshell The docshell that will consume the load. Nit: Not sure why there is no "-" here when you have them below. @@ +110,5 @@ > + * additional setup for this load you can get a loadInfo > + * object by calling createLoadInfo. Once you have this > + * object you can set the needed properties on it and > + * then pass it to loadURI. > + * @param aLoadFlags - Flags to modify load behaviour. Flags are defined in ... for example: No double spaces here.
Attachment #8780394 - Flags: review?(jorgk) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 51.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: