Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2430)

Unified Diff: device/bluetooth/bluetooth_adapter_factory.cc

Issue 11411130: Implemented BluetoothTaskManagerWin class. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: changed to const char[] Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_adapter_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter_factory.cc
diff --git a/device/bluetooth/bluetooth_adapter_factory.cc b/device/bluetooth/bluetooth_adapter_factory.cc
index 2e8dac0ae778ed43487e18ebeecd3f67b023669a..23bb07d3da59601aec983e69710e18fe75f87447 100644
--- a/device/bluetooth/bluetooth_adapter_factory.cc
+++ b/device/bluetooth/bluetooth_adapter_factory.cc
@@ -11,6 +11,8 @@
#if defined(OS_CHROMEOS)
#include "device/bluetooth/bluetooth_adapter_chromeos.h"
+#elif defined(OS_WIN)
+#include "device/bluetooth/bluetooth_adapter_win.h"
#endif
namespace {
@@ -30,6 +32,8 @@ namespace device {
bool BluetoothAdapterFactory::IsBluetoothAdapterAvailable() {
#if defined(OS_CHROMEOS)
return true;
+#elif defined(OS_WIN)
+ return true;
#endif
return false;
}
@@ -43,6 +47,10 @@ void BluetoothAdapterFactory::RunCallbackOnAdapterReady(
new chromeos::BluetoothAdapterChromeOs;
new_adapter->TrackDefaultAdapter();
default_adapter.Get() = new_adapter->weak_ptr_factory_.GetWeakPtr();
+#elif defined(OS_WIN)
+ BluetoothAdapterWin* new_adapter = new BluetoothAdapterWin();
+ new_adapter->TrackDefaultAdapter();
+ default_adapter.Get() = new_adapter->weak_ptr_factory_.GetWeakPtr();
#endif
}
@@ -62,6 +70,8 @@ BluetoothAdapter* BluetoothAdapterFactory::Create(const std::string& address) {
new chromeos::BluetoothAdapterChromeOs;
adapter_chromeos->FindAdapter(address);
adapter = adapter_chromeos;
+#elif defined(OS_WIN)
+ adapter = new BluetoothAdapterWin();
#endif
return adapter;
}
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_adapter_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698