Bug 853200 - Remove unused event handlers from idl, r=echou, sr=mrbkap

This commit is contained in:
Gina Yeh 2013-03-28 18:05:58 +08:00
Родитель 02673ae0ed
Коммит 9b0a35d895
9 изменённых файлов: 3 добавлений и 93 удалений

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

@ -637,7 +637,6 @@ GK_ATOM(onalerting, "onalerting")
GK_ATOM(onanimationend, "onanimationend")
GK_ATOM(onanimationiteration, "onanimationiteration")
GK_ATOM(onanimationstart, "onanimationstart")
GK_ATOM(onauthorize, "onauthorize")
GK_ATOM(onAppCommand, "onAppCommand")
GK_ATOM(onbeforecopy, "onbeforecopy")
GK_ATOM(onbeforecut, "onbeforecut")
@ -651,7 +650,6 @@ GK_ATOM(onbroadcast, "onbroadcast")
GK_ATOM(onbusy, "onbusy")
GK_ATOM(oncached, "oncached")
GK_ATOM(oncallschanged, "oncallschanged")
GK_ATOM(oncancel, "oncancel")
GK_ATOM(oncardstatechange, "oncardstatechange")
GK_ATOM(oncfstatechange, "oncfstatechange")
GK_ATOM(onchange, "onchange")
@ -676,8 +674,6 @@ GK_ATOM(ondataerror, "ondataerror")
GK_ATOM(ondblclick, "ondblclick")
GK_ATOM(ondeliverysuccess, "ondeliverysuccess")
GK_ATOM(ondeliveryerror, "ondeliveryerror")
GK_ATOM(ondevicecreated, "ondevicecreated")
GK_ATOM(ondevicedisappeared, "ondevicedisappeared")
GK_ATOM(ondevicefound, "ondevicefound")
GK_ATOM(ondialing, "ondialing")
GK_ATOM(ondisabled, "ondisabled")
@ -762,12 +758,8 @@ GK_ATOM(onpopuphidden, "onpopuphidden")
GK_ATOM(onpopuphiding, "onpopuphiding")
GK_ATOM(onpopupshowing, "onpopupshowing")
GK_ATOM(onpopupshown, "onpopupshown")
GK_ATOM(onpropertychanged, "onpropertychanged")
GK_ATOM(onreadystatechange, "onreadystatechange")
GK_ATOM(onreceived, "onreceived")
GK_ATOM(onrequestconfirmation, "onrequestconfirmation")
GK_ATOM(onrequestpasskey, "onrequestpasskey")
GK_ATOM(onrequestpincode, "onrequestpincode")
GK_ATOM(onRequest, "onRequest")
GK_ATOM(onreset, "onreset")
GK_ATOM(onresuming, "onresuming")

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

@ -14,7 +14,6 @@
#include "nsContentUtils.h"
#include "nsDOMClassInfo.h"
#include "nsIDOMBluetoothDeviceAddressEvent.h"
#include "nsIDOMBluetoothDeviceEvent.h"
#include "nsTArrayHelpers.h"
#include "DOMRequest.h"
@ -287,29 +286,6 @@ BluetoothAdapter::Notify(const BluetoothSignal& aData)
e->InitBluetoothDeviceEvent(NS_LITERAL_STRING("devicefound"),
false, false, device);
DispatchTrustedEvent(event);
} else if (aData.name().EqualsLiteral("DeviceDisappeared")) {
const nsAString& deviceAddress = aData.value().get_nsString();
nsCOMPtr<nsIDOMEvent> event;
NS_NewDOMBluetoothDeviceAddressEvent(getter_AddRefs(event), this, nullptr, nullptr);
nsCOMPtr<nsIDOMBluetoothDeviceAddressEvent> e = do_QueryInterface(event);
e->InitBluetoothDeviceAddressEvent(NS_LITERAL_STRING("devicedisappeared"),
false, false, deviceAddress);
DispatchTrustedEvent(e);
} else if (aData.name().EqualsLiteral("DeviceCreated")) {
NS_ASSERTION(aData.value().type() == BluetoothValue::TArrayOfBluetoothNamedValue,
"DeviceCreated: Invalid value type");
nsRefPtr<BluetoothDevice> device =
BluetoothDevice::Create(GetOwner(), GetPath(), aData.value());
nsCOMPtr<nsIDOMEvent> event;
NS_NewDOMBluetoothDeviceEvent(getter_AddRefs(event), this, nullptr, nullptr);
nsCOMPtr<nsIDOMBluetoothDeviceEvent> e = do_QueryInterface(event);
e->InitBluetoothDeviceEvent(NS_LITERAL_STRING("devicecreated"),
false, false, device);
DispatchTrustedEvent(e);
} else if (aData.name().EqualsLiteral("PropertyChanged")) {
NS_ASSERTION(v.type() == BluetoothValue::TArrayOfBluetoothNamedValue,
"PropertyChanged: Invalid value type");
@ -371,13 +347,6 @@ BluetoothAdapter::StopDiscovery(nsIDOMDOMRequest** aRequest)
return StartStopDiscovery(false, aRequest);
}
NS_IMETHODIMP
BluetoothAdapter::GetEnabled(bool* aEnabled)
{
*aEnabled = mEnabled;
return NS_OK;
}
NS_IMETHODIMP
BluetoothAdapter::GetAddress(nsAString& aAddress)
{
@ -761,12 +730,4 @@ BluetoothAdapter::ConfirmReceivingFile(const nsAString& aDeviceAddress,
return NS_OK;
}
NS_IMPL_EVENT_HANDLER(BluetoothAdapter, propertychanged)
NS_IMPL_EVENT_HANDLER(BluetoothAdapter, devicefound)
NS_IMPL_EVENT_HANDLER(BluetoothAdapter, devicedisappeared)
NS_IMPL_EVENT_HANDLER(BluetoothAdapter, devicecreated)
NS_IMPL_EVENT_HANDLER(BluetoothAdapter, requestconfirmation)
NS_IMPL_EVENT_HANDLER(BluetoothAdapter, requestpincode)
NS_IMPL_EVENT_HANDLER(BluetoothAdapter, requestpasskey)
NS_IMPL_EVENT_HANDLER(BluetoothAdapter, authorize)
NS_IMPL_EVENT_HANDLER(BluetoothAdapter, cancel)

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

@ -69,7 +69,6 @@ private:
nsString mAddress;
nsString mName;
bool mEnabled;
bool mDiscoverable;
bool mDiscovering;
bool mPairable;

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

@ -254,6 +254,3 @@ BluetoothDevice::GetServices(JSContext* aCx, jsval* aServices)
return NS_OK;
}
NS_IMPL_EVENT_HANDLER(BluetoothDevice, propertychanged)
NS_IMPL_EVENT_HANDLER(BluetoothDevice, connected)
NS_IMPL_EVENT_HANDLER(BluetoothDevice, disconnected)

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

@ -21,7 +21,6 @@ if CONFIG['MOZ_B2G_BT']:
'nsIDOMBluetoothManager.idl',
'nsIDOMBluetoothAdapter.idl',
'nsIDOMBluetoothDevice.idl',
'nsIDOMBluetoothDeviceEvent.idl',
'nsIDOMBluetoothDeviceAddressEvent.idl',
'nsIDOMBluetoothDeviceEvent.idl'
]

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

@ -10,12 +10,11 @@ interface nsIDOMDOMRequest;
interface nsIDOMBlob;
interface nsIDOMBluetoothDevice;
[scriptable, builtinclass, uuid(6a4a9415-cda3-4a19-b79e-05d9bc2c2700)]
[scriptable, builtinclass, uuid(b0e7117a-25e3-4ea0-9cf4-3f8cd85f9e7a)]
interface nsIDOMBluetoothAdapter : nsIDOMEventTarget
{
readonly attribute DOMString address;
[binaryname(AdapterClass)] readonly attribute unsigned long class;
readonly attribute bool enabled;
readonly attribute bool discovering;
[implicit_jscontext]
@ -60,16 +59,4 @@ interface nsIDOMBluetoothAdapter : nsIDOMEventTarget
// Fired when discoverying and any device is discovered.
[implicit_jscontext] attribute jsval ondevicefound;
// Fired when any device is out of discoverable range.
[implicit_jscontext] attribute jsval ondevicedisappeared;
// Fired when any device is created.
[implicit_jscontext] attribute jsval ondevicecreated;
// Fired when a property of the adapter is changed
[implicit_jscontext] attribute jsval onpropertychanged;
// Pairing related events
[implicit_jscontext] attribute jsval onrequestconfirmation;
[implicit_jscontext] attribute jsval onrequestpincode;
[implicit_jscontext] attribute jsval onrequestpasskey;
[implicit_jscontext] attribute jsval onauthorize;
[implicit_jscontext] attribute jsval oncancel;
};

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

@ -6,7 +6,7 @@
#include "nsIDOMEventTarget.idl"
[scriptable, builtinclass, uuid(4a679fc6-572a-4ddc-8e93-cfbddb9f2d6a)]
[scriptable, builtinclass, uuid(4ca7697a-9d0c-492e-a6be-ccc5c3ec503c)]
interface nsIDOMBluetoothDevice : nsIDOMEventTarget
{
readonly attribute DOMString address;
@ -17,7 +17,4 @@ interface nsIDOMBluetoothDevice : nsIDOMEventTarget
[implicit_jscontext] readonly attribute jsval services;
readonly attribute bool connected;
readonly attribute bool paired;
[implicit_jscontext] attribute jsval onpropertychanged;
[implicit_jscontext] attribute jsval onconnected;
[implicit_jscontext] attribute jsval ondisconnected;
};

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

@ -1,21 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsIDOMEvent.idl"
[scriptable, builtinclass, uuid(90c55b1c-2da5-4a30-bf09-0c70369a8d89)]
interface nsIDOMBluetoothDeviceAddressEvent : nsIDOMEvent
{
readonly attribute DOMString deviceAddress;
[noscript] void initBluetoothDeviceAddressEvent(in DOMString aType,
in boolean aCanBubble,
in boolean aCancelable,
in DOMString aDeviceAddress);
};
dictionary BluetoothDeviceAddressEventInit : EventInit
{
DOMString deviceAddress;
};

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

@ -26,7 +26,6 @@ simple_events = [
'SmartCardEvent',
#ifdef MOZ_B2G_BT
'BluetoothDeviceEvent',
'BluetoothDeviceAddressEvent',
#endif
#ifdef MOZ_B2G_RIL
'CallEvent',