mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1000670 - part 3 - DOM: create and dispatch clirmodechange event. r=smaug
This commit is contained in:
parent
5042aa37e7
commit
b6e5cdb4e3
@ -676,6 +676,7 @@ GK_ATOM(onchargingchange, "onchargingchange")
|
||||
GK_ATOM(onchargingtimechange, "onchargingtimechange")
|
||||
GK_ATOM(onchecking, "onchecking")
|
||||
GK_ATOM(onclick, "onclick")
|
||||
GK_ATOM(onclirmodechange, "onclirmodechange")
|
||||
GK_ATOM(onclose, "onclose")
|
||||
GK_ATOM(oncommand, "oncommand")
|
||||
GK_ATOM(oncommandupdate, "oncommandupdate")
|
||||
|
@ -229,6 +229,10 @@ const kEventConstructors = {
|
||||
return new MozCellBroadcastEvent(aName, aProps);
|
||||
},
|
||||
},
|
||||
MozClirModeEvent: { create: function (aName, aProps) {
|
||||
return new MozClirModeEvent(aName, aProps);
|
||||
},
|
||||
},
|
||||
MozContactChangeEvent: { create: function (aName, aProps) {
|
||||
return new MozContactChangeEvent(aName, aProps);
|
||||
},
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "GeneratedEvents.h"
|
||||
#include "mozilla/dom/CFStateChangeEvent.h"
|
||||
#include "mozilla/dom/DataErrorEvent.h"
|
||||
#include "mozilla/dom/MozClirModeEvent.h"
|
||||
#include "mozilla/dom/MozEmergencyCbModeEvent.h"
|
||||
#include "mozilla/dom/MozOtaStatusEvent.h"
|
||||
#include "mozilla/dom/USSDReceivedEvent.h"
|
||||
@ -79,6 +80,7 @@ NS_IMPL_EVENT_HANDLER(MobileConnection, emergencycbmodechange)
|
||||
NS_IMPL_EVENT_HANDLER(MobileConnection, otastatuschange)
|
||||
NS_IMPL_EVENT_HANDLER(MobileConnection, iccchange)
|
||||
NS_IMPL_EVENT_HANDLER(MobileConnection, radiostatechange)
|
||||
NS_IMPL_EVENT_HANDLER(MobileConnection, clirmodechange)
|
||||
|
||||
MobileConnection::MobileConnection(uint32_t aClientId)
|
||||
: mClientId(aClientId)
|
||||
@ -733,3 +735,21 @@ MobileConnection::NotifyRadioStateChanged()
|
||||
|
||||
return DispatchTrustedEvent(NS_LITERAL_STRING("radiostatechange"));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
MobileConnection::NotifyClirModeChanged(uint32_t aMode)
|
||||
{
|
||||
if (!CheckPermission("mobileconnection")) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
MozClirModeEventInit init;
|
||||
init.mBubbles = false;
|
||||
init.mCancelable = false;
|
||||
init.mMode = aMode;
|
||||
|
||||
nsRefPtr<MozClirModeEvent> event =
|
||||
MozClirModeEvent::Constructor(this, NS_LITERAL_STRING("clirmodechange"), init);
|
||||
|
||||
return DispatchTrustedEvent(event);
|
||||
}
|
||||
|
@ -619,6 +619,8 @@ var interfaceNamesInGlobalScope =
|
||||
{name: "MozCellBroadcast", b2g: true, pref: "dom.cellbroadcast.enabled"},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "MozCellBroadcastEvent", b2g: true, pref: "dom.cellbroadcast.enabled"},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "MozClirModeEvent", b2g: true, pref: "dom.mobileconnection.enabled"},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
"mozContact",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
|
Loading…
Reference in New Issue
Block a user