| Index: extensions/browser/api/bluetooth/bluetooth_extension_function.cc
|
| diff --git a/extensions/browser/api/bluetooth/bluetooth_extension_function.cc b/extensions/browser/api/bluetooth/bluetooth_extension_function.cc
|
| index 003a8393213f8e56c597358bc243908b1120f18a..028f144ab4fc2c83f28f21f637dd8711e6858dcd 100644
|
| --- a/extensions/browser/api/bluetooth/bluetooth_extension_function.cc
|
| +++ b/extensions/browser/api/bluetooth/bluetooth_extension_function.cc
|
| @@ -6,10 +6,12 @@
|
|
|
| #include "base/memory/ref_counted.h"
|
| #include "content/public/browser/browser_thread.h"
|
| +#include "content/public/browser/web_contents.h"
|
| #include "device/bluetooth/bluetooth_adapter.h"
|
| #include "device/bluetooth/bluetooth_adapter_factory.h"
|
| #include "extensions/browser/api/bluetooth/bluetooth_api.h"
|
| #include "extensions/browser/api/bluetooth/bluetooth_event_router.h"
|
| +#include "url/gurl.h"
|
|
|
| using content::BrowserThread;
|
|
|
| @@ -59,6 +61,12 @@ bool BluetoothExtensionFunction::RunAsync() {
|
| return true;
|
| }
|
|
|
| +std::string BluetoothExtensionFunction::GetExtensionId() {
|
| + if (extension())
|
| + return extension()->id();
|
| + return GetSenderWebContents()->GetURL().host();
|
| +}
|
| +
|
| void BluetoothExtensionFunction::RunOnAdapterReady(
|
| scoped_refptr<device::BluetoothAdapter> adapter) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
|
|