зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1472491: Part 5α - Add DateTimePickerChild actor. r=mconley
MozReview-Commit-ID: EWTCdNCmE9S --HG-- rename : toolkit/modules/DateTimePickerContent.jsm => toolkit/actors/DateTimePickerChild.jsm extra : rebase_source : c92d504e8da81151a3937d2a2091ef07356f5df7
This commit is contained in:
Родитель
aed171e1e6
Коммит
4e1ac07ba3
|
@ -6,18 +6,21 @@ ChromeUtils.import("resource://gre/modules/Services.jsm");
|
|||
ChromeUtils.defineModuleGetter(this, "BrowserUtils",
|
||||
"resource://gre/modules/BrowserUtils.jsm");
|
||||
|
||||
var EXPORTED_SYMBOLS = ["DateTimePickerContent"];
|
||||
var EXPORTED_SYMBOLS = ["DateTimePickerChild"];
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/ActorChild.jsm");
|
||||
|
||||
/**
|
||||
* DateTimePickerContent is the communication channel between the input box
|
||||
* DateTimePickerChild is the communication channel between the input box
|
||||
* (content) for date/time input types and its picker (chrome).
|
||||
*/
|
||||
class DateTimePickerContent {
|
||||
class DateTimePickerChild extends ActorChild {
|
||||
/**
|
||||
* On init, just listen for the event to open the picker, once the picker is
|
||||
* opened, we'll listen for update and close events.
|
||||
*/
|
||||
constructor(global) {
|
||||
super(global);
|
||||
this._inputElement = null;
|
||||
this._global = global;
|
||||
}
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
FINAL_TARGET_FILES.actors += [
|
||||
'AudioPlaybackChild.jsm',
|
||||
'DateTimePickerChild.jsm',
|
||||
'FindBarChild.jsm',
|
||||
'PopupBlockingChild.jsm',
|
||||
'PrintingChild.jsm',
|
||||
|
|
|
@ -38,12 +38,6 @@ XPCOMUtils.defineLazyProxy(this, "UITourListener", () => {
|
|||
return new tmp.UITourListener(global);
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyProxy(this, "DateTimePickerContent", () => {
|
||||
let tmp = {};
|
||||
ChromeUtils.import("resource://gre/modules/DateTimePickerContent.jsm", tmp);
|
||||
return new tmp.DateTimePickerContent(this);
|
||||
});
|
||||
|
||||
// Lazily load the finder code
|
||||
addMessageListener("Finder:Initialize", function() {
|
||||
let {RemoteFinderListener} = ChromeUtils.import("resource://gre/modules/RemoteFinder.jsm", {});
|
||||
|
@ -64,8 +58,6 @@ var AutoScrollListener = {
|
|||
};
|
||||
Services.els.addSystemEventListener(global, "mousedown", AutoScrollListener, true);
|
||||
|
||||
addEventListener("MozOpenDateTimePicker", DateTimePickerContent);
|
||||
|
||||
var UnselectedTabHoverObserver = {
|
||||
init() {
|
||||
addMessageListener("Browser:UnselectedTabHover", this);
|
||||
|
|
|
@ -112,6 +112,15 @@ let ACTORS = {
|
|||
},
|
||||
},
|
||||
|
||||
DateTimePicker: {
|
||||
child: {
|
||||
module: "resource://gre/actors/DateTimePickerChild.jsm",
|
||||
events: {
|
||||
"MozOpenDateTimePicker": {},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
FindBar: {
|
||||
child: {
|
||||
module: "resource://gre/actors/FindBarChild.jsm",
|
||||
|
|
|
@ -196,7 +196,6 @@ EXTRA_JS_MODULES += [
|
|||
'Console.jsm',
|
||||
'CreditCard.jsm',
|
||||
'css-selector.js',
|
||||
'DateTimePickerContent.jsm',
|
||||
'DateTimePickerParent.jsm',
|
||||
'DeferredTask.jsm',
|
||||
'Deprecated.jsm',
|
||||
|
|
Загрузка…
Ссылка в новой задаче