Bug 778640 - Backout due to burning. r=bustage

This commit is contained in:
Chris Pearce 2012-08-17 16:22:25 +12:00
parent f86eea38b2
commit 8406326152
4 changed files with 1 additions and 39 deletions

View File

@ -14,13 +14,11 @@
#include "BluetoothReplyRunnable.h"
#include "BluetoothUtils.h"
#include "GeneratedEvents.h"
#include "nsDOMClassInfo.h"
#include "nsDOMEvent.h"
#include "nsThreadUtils.h"
#include "nsXPCOMCIDInternal.h"
#include "nsIDOMDOMRequest.h"
#include "nsIDOMBluetoothDeviceAddressEvent.h"
#include "nsContentUtils.h"
#include "mozilla/LazyIdleThread.h"
@ -274,19 +272,6 @@ BluetoothAdapter::Notify(const BluetoothSignal& aData)
nsRefPtr<BluetoothDevice> d = BluetoothDevice::Create(GetOwner(), mPath, aData.value());
nsRefPtr<BluetoothDeviceEvent> e = BluetoothDeviceEvent::Create(d);
e->Dispatch(ToIDOMEventTarget(), NS_LITERAL_STRING("devicefound"));
} else if (aData.name().EqualsLiteral("DeviceDisappeared")) {
const nsAString& deviceAddress = aData.value().get_nsString();
nsCOMPtr<nsIDOMEvent> event;
NS_NewDOMBluetoothDeviceAddressEvent(getter_AddRefs(event), nullptr, nullptr);
nsCOMPtr<nsIDOMBluetoothDeviceAddressEvent> e = do_QueryInterface(event);
e->InitBluetoothDeviceAddressEvent(NS_LITERAL_STRING("devicedisappeared"),
false, false, deviceAddress);
e->SetTrusted(true);
bool dummy;
DispatchEvent(event, &dummy);
} else if (aData.name().EqualsLiteral("PropertyChanged")) {
// Get BluetoothNamedValue, make sure array length is 1
InfallibleTArray<BluetoothNamedValue> arr = aData.value().get_ArrayOfBluetoothNamedValue();

View File

@ -45,7 +45,6 @@ XPIDLSRCS = \
nsIDOMBluetoothAdapter.idl \
nsIDOMBluetoothDevice.idl \
nsIDOMBluetoothDeviceEvent.idl \
nsIDOMBluetoothDeviceAddressEvent.idl \
nsIDOMBluetoothPropertyEvent.idl \
$(NULL)

View File

@ -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(afcb832f-bbb5-45fa-b703-f8185bd2d26d)]
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;
};

View File

@ -21,8 +21,7 @@ simple_events = [
'DeviceOrientationEvent',
'DeviceLightEvent',
'MozApplicationEvent',
'DeviceStorageChangeEvent',
'BluetoothDeviceAddressEvent'
'DeviceStorageChangeEvent'
]
""" include file names """