Bug 1386696 - [1.0] Provide event dispatcher to GeckoView content modules to allow for event forwarding. r=jchen

This commit is contained in:
Eugen Sawin 2017-08-02 18:24:48 +02:00
Родитель de267ecbbf
Коммит a4fa3382d8
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -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",