summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/event_names.h
diff options
context:
space:
mode:
authorbryeung@chromium.org <bryeung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 00:06:05 +0000
committerbryeung@chromium.org <bryeung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 00:06:05 +0000
commita77b4dfa24f7e7b35148fe0535d5bebbd0206bbe (patch)
tree5f7e97b4c12dad9e5bbf723396b8d606039e7b48 /chrome/browser/extensions/event_names.h
parent16449b24f3f63906f32f6a89032617c73ff72edf (diff)
downloadchromium_src-a77b4dfa24f7e7b35148fe0535d5bebbd0206bbe.zip
chromium_src-a77b4dfa24f7e7b35148fe0535d5bebbd0206bbe.tar.gz
chromium_src-a77b4dfa24f7e7b35148fe0535d5bebbd0206bbe.tar.bz2
Fix a race in chrome.bluetooth.getDevices.
Because Chrome Apps all have lazy background pages, events might be queued early in the extensions lifetime (i.e. after they have started running, but before the DidStopLoading signal is received). If that happens, those events might still be pending after the SendResponse call for getDevices. However, the event listeners are cleared in the customCallback for getDevices, so these pending events will be lost. This CL adds a final sentinel device to the responses, and does work in experimental_bluetooth_custom_bindings.js to ensure that all events have been delivered before the API callback function is called. TEST=api tests are passing BUG=none Review URL: https://chromiumcodereview.appspot.com/11092027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162578 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/event_names.h')
-rw-r--r--chrome/browser/extensions/event_names.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/browser/extensions/event_names.h b/chrome/browser/extensions/event_names.h
index 543c080..823c478 100644
--- a/chrome/browser/extensions/event_names.h
+++ b/chrome/browser/extensions/event_names.h
@@ -69,6 +69,7 @@ extern const char kOnOffscreenTabUpdated[];
// Bluetooth.
extern const char kBluetoothOnAvailabilityChanged[];
extern const char kBluetoothOnDeviceDiscovered[];
+extern const char kBluetoothOnDeviceSearchFinished[];
extern const char kBluetoothOnDeviceSearchResult[];
extern const char kBluetoothOnDiscoveringChanged[];
extern const char kBluetoothOnPowerChanged[];