Closed Bug 1317604 Opened 3 years ago Closed 3 years ago

Add global and per-window EventDispatcher to Messaging.jsm

Categories

(GeckoView :: General, defect)

All
Android
defect
Not set

Tracking

(firefox53 fixed)

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: jchen, Assigned: jchen)

References

Details

Attachments

(5 files, 1 obsolete file)

Add an EventDispatcher interface to Messaging.jsm that supports either the global EventDispatcher or per-window EventDispatcher.
Add a new EventDispatcher interface to Messaging.jsm, and provide means
to access either the global EventDispatcher through
EventDispatcher.instance or a per-window EventDispatcher through
EventDispatcher.for(window). The old Messaging object is retained until
we can convert all existing uses of it in Fennec to use EventDispatcher,
at which point `Messaging` will be made to point to
`EventDispatcher.instance`.
Attachment #8811608 - Flags: review?(snorp)
Attachment #8811608 - Flags: review?(s.kaspari)
GeckoView's GeckoEventListener and NativeEventListener are not actually
hooked up to events right now, so it's better to just rip them out until
we figure out a better implementation in the future.
Attachment #8811609 - Flags: review?(snorp)
Convert prompts to use BundleEventListener and GeckoBundle.
Attachment #8811610 - Flags: review?(s.kaspari)
Comment on attachment 8811610 [details] [diff] [review]
3. Convert prompts to BundleEventListener (v1)

On second thought, we should move this patch to a separate bug, because there will be a lot of these conversion patches that are better suited for their own bugs.
Attachment #8811610 - Attachment is obsolete: true
Attachment #8811610 - Flags: review?(s.kaspari)
testEventDispatcher used to use nsIAndroidEventDispatcher directly,
either through nsIAndroidBridge or through a window's nsIAndroidView.
Now that Messaging.jsm provides delegate objects for those interfaces,
testEventDispatcher should use Messaging.jsm, so that we are testing
Messaging.jsm as well.
Attachment #8811636 - Flags: review?(snorp)
Attachment #8811608 - Flags: review?(snorp) → review+
Attachment #8811609 - Flags: review?(snorp) → review+
Attachment #8811636 - Flags: review?(snorp) → review+
Attachment #8811608 - Flags: review?(s.kaspari) → review+
Pushed by nchen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/22411be95565
1. Add EventDispatcher to Messaging.jsm; r=snorp r=sebastian
https://hg.mozilla.org/integration/mozilla-inbound/rev/946e15013499
1a. Update testEventDispatcher to use Messaging.jsm; r=snorp
https://hg.mozilla.org/integration/mozilla-inbound/rev/c672332a484d
2. Rip out GeckoView event listeners; r=snorp
Pushed by nchen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/99875ec5d316
3. Don't create EventDispatcher when JNI is not available; r=me
Follow-up to not create the global EventDispatcher in AndroidBridge when
JNI is not available.
Attachment #8812924 - Flags: review+
Follow-up to include nsIObserver in the list of interfaces implemented
by QueryInterface for nsAndroidBridge. This fixes a bug where QI to
nsIObserver fails when removing nsAnroidBridge observers.
Attachment #8812925 - Flags: review+
Pushed by nchen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9766420605fa
4. Include nsIObserver in nsAndroidBridge interfaces; r=me on CLOSED TREE
Product: Firefox for Android → GeckoView
Target Milestone: Firefox 53 → mozilla53
You need to log in before you can comment on or make changes to this bug.