Closed Bug 1007190 Opened 10 years ago Closed 10 years ago

Separate out handleWindowClose from MozSocialAPI so that it can be used by Loop

Categories

(Hello (Loop) :: Client, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1000007

People

(Reporter: standard8, Assigned: standard8)

References

Details

(Whiteboard: [p=1, est:0.5d])

Attachments

(2 files)

The function `handleWindowClose` is useful for setting up handling of window.close. We'd like to have it available for loop as well as for Social.

The best way seems to move this into the new Chat.jsm and make it accessible from there.
This does the separation. Chat.jsm seems to be the most logical place for this. I'll start a try run in a bit.
Attachment #8418814 - Flags: review?(mhammond)
Since we can't land this part in mozilla-central at the moment (as we can't land the rest of loop), here's the additional two-line change that loop needs to use the newly separated out function in the previous patch.
Attachment #8419437 - Flags: review?(mhammond)
TBH, I don't think it makes sense in Chat.jsm - it is used for all panels, not just chats.  So I think grabbing it directly from MozSocialAPI.jsm is fine, but it should have a better name - something like hookWindowCloseForPanelClose() or hookWindowCloseToClosePanel() or something.

I'm also think this should just be incorporated into the patch to land MozLoopAPI.jsm - it's difficult to r+ a patch that touches code that's not yet in the tree and doesn't yet have r+
Ok, this is now wrapped into the patch on bug 1000007.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Comment on attachment 8418814 [details] [diff] [review]
Separate out handleWindowClose from MozSocialAPI so that it can be used by Loop.

Clearing requests on closed bugs.
Attachment #8418814 - Flags: review?(mhammond)
Comment on attachment 8419437 [details] [diff] [review]
Use the new exported function for handling panel and chatbox closes in Loop.

Clearing requests on closed bugs.
Attachment #8419437 - Flags: review?(mhammond)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: