Closed Bug 1390282 Opened 7 years ago Closed 7 years ago

Allow RemotePageManager to accept an array of URLs

Categories

(Firefox :: New Tab Page, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 57
Tracking Status
firefox57 --- fixed

People

(Reporter: k88hudson, Assigned: ahillier)

References

Details

Attachments

(1 file)

For Activity Stream, we need to be able to target messages from both about:newtab and about:home; it would be great if we could configure the RemotePageManager to listen to both.
Assignee: nobody → ahillier
Attachment #8897454 - Flags: review?(dtownsend)
Comment on attachment 8897454 [details]
Bug 1390282 - Allow RemotePageManager to accept an array of URLs

https://reviewboard.mozilla.org/r/168750/#review174084

I'd like to see some tests for this please.

::: toolkit/modules/RemotePageManager.jsm:67
(Diff revision 1)
> - * messages from all loaded pages from the requested url.
> + * messages from all loaded pages from the requested urls.
>   */
> -this.RemotePages = function(url) {
> -  this.url = url;
> +this.RemotePages = function(urls) {
> +  this.urls = Array.isArray(urls) ? urls : [urls];
> +  // In case anyone is still using .url property
> +  this.url = this.urls[0];

Do we have anyone in-tree using this? If not let's just remove it.
Attachment #8897454 - Flags: review?(dtownsend)
ahillier, what's the plan with having RemotePages take an array? Will AboutNewTab be updated to register both about:home and about:newtab? I suppose registering the existing about:home should effectively be a no-op as that page isn't listening for activity stream messages anyway.. ?
Flags: needinfo?(ahillier)
Mardak: Yeah, with this patch and with AboutNewTab registering both pages, setting ActivityStream as the home page in AboutRedirector gives a build with a working ActivityStream home page.
Flags: needinfo?(ahillier)
Comment on attachment 8897454 [details]
Bug 1390282 - Allow RemotePageManager to accept an array of URLs

https://reviewboard.mozilla.org/r/168750/#review174248
Attachment #8897454 - Flags: review?(dtownsend) → review+
Pushed by khudson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7eed04597d5e
Allow RemotePageManager to accept an array of URLs r=mossop
https://hg.mozilla.org/mozilla-central/rev/7eed04597d5e
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Component: Activity Streams: Newtab → New Tab Page
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: