зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1386696 - [1.0] Provide event dispatcher to GeckoView content modules to allow for event forwarding. r=jchen
This commit is contained in:
Родитель
de267ecbbf
Коммит
a4fa3382d8
|
@ -8,6 +8,11 @@ this.EXPORTED_SYMBOLS = ["GeckoViewContentModule"];
|
|||
|
||||
const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
|
||||
|
||||
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "EventDispatcher",
|
||||
"resource://gre/modules/Messaging.jsm");
|
||||
|
||||
var dump = Cu.import("resource://gre/modules/AndroidLog.jsm", {})
|
||||
.AndroidLog.d.bind(null, "ViewContentModule");
|
||||
|
||||
|
@ -19,6 +24,7 @@ class GeckoViewContentModule {
|
|||
constructor(aModuleName, aMessageManager) {
|
||||
this.moduleName = aModuleName;
|
||||
this.messageManager = aMessageManager;
|
||||
this.eventDispatcher = EventDispatcher.for(this);
|
||||
|
||||
this.messageManager.addMessageListener(
|
||||
"GeckoView:Register",
|
||||
|
|
Загрузка…
Ссылка в новой задаче