Closed
Bug 843910
Opened 13 years ago
Closed 12 years ago
window observer notifications
Categories
(Add-on SDK Graveyard :: General, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla28
People
(Reporter: irakli, Assigned: irakli)
References
Details
Attachments
(1 file, 1 obsolete file)
|
11.38 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
At the moment nsIWindowWatcher can be used to observe windows being opened /
closed via "domwindowopened" / "domwindowclosed" notifications.
https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIWindowWatcher#registerNotification%28%29
This is used by everything in SDK to register further event handlers for things that happen in those windows. It would be much better if those notifications were just dispatched on observer service itself.
| Assignee | ||
Comment 1•13 years ago
|
||
As a matter of fact it looks like "domwindowopened" and "domwindowclosed" notifications are actually dispatched.
| Assignee | ||
Comment 2•13 years ago
|
||
I have to say that we still need something for focus events.
Priority: -- → P2
| Assignee | ||
Comment 3•13 years ago
|
||
So we need observer notifications for:
- focus
- DOMContentLoaded
- load
For all this events we currently just register event listeners.
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → rFobic
| Assignee | ||
Comment 4•12 years ago
|
||
Attachment #8339180 -
Flags: review?(mrbkap)
| Assignee | ||
Comment 5•12 years ago
|
||
Blake, it turned out that oranges in try were caused by my inexperience with HG.
My last try push is pretty green: https://tbpl.mozilla.org/?tree=Try&rev=58e485f3d9e7
only few known intermediate oranges showed up.
| Assignee | ||
Comment 6•12 years ago
|
||
Attachment #8341270 -
Flags: review?(dao)
| Assignee | ||
Comment 7•12 years ago
|
||
Comment on attachment 8341270 [details] [diff] [review]
Implement tab.browser
Oops wrong bug.
Attachment #8341270 -
Attachment is obsolete: true
Attachment #8341270 -
Flags: review?(dao)
Comment 8•12 years ago
|
||
Comment on attachment 8339180 [details] [diff] [review]
bug-843910.patch
Review of attachment 8339180 [details] [diff] [review]:
-----------------------------------------------------------------
I'm fine with this for now. We should probably file a followup for figuring out how to do this correctly for and e10s world, though.
::: content/base/src/nsDocument.cpp
@@ +4653,5 @@
> }
>
> + // Dispatch observer notification to notify observers document is interactive.
> + nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
> + nsCOMPtr<nsIPrincipal> principal = GetPrincipal();
Here and below: no need for a nsCOMPtr, you can just do:
nsIPrincipal *principal = GetPrincipal();
Attachment #8339180 -
Flags: review?(mrbkap) → review+
| Assignee | ||
Comment 9•12 years ago
|
||
Landed & submitted Bug 946971 to figure out how to e10s-ify this.
Comment 10•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in
before you can comment on or make changes to this bug.
Description
•