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

Unified Diff: components/pairing/bluetooth_host_pairing_controller.h

Issue 1957953003: [Merge to M50] [Chrome OS Bootstrapping]: Do not always power off the Bluetooth adapter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 7 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 | « components/pairing/DEPS ('k') | components/pairing/bluetooth_host_pairing_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/pairing/bluetooth_host_pairing_controller.h
diff --git a/components/pairing/bluetooth_host_pairing_controller.h b/components/pairing/bluetooth_host_pairing_controller.h
index 28311521510ebf48406965df136f16fd9edc3b99..b5ef979dad997de27098523eef4182981161eff9 100644
--- a/components/pairing/bluetooth_host_pairing_controller.h
+++ b/components/pairing/bluetooth_host_pairing_controller.h
@@ -17,6 +17,7 @@
#include "device/bluetooth/bluetooth_adapter.h"
#include "device/bluetooth/bluetooth_device.h"
#include "device/bluetooth/bluetooth_socket.h"
+#include "device/hid/input_service_linux.h"
namespace device {
class BluetoothAdapter;
@@ -34,9 +35,11 @@ class BluetoothHostPairingController
public device::BluetoothAdapter::Observer,
public device::BluetoothDevice::PairingDelegate {
public:
- typedef HostPairingController::Observer Observer;
+ using Observer = HostPairingController::Observer;
+ using InputDeviceInfo = device::InputServiceLinux::InputDeviceInfo;
- BluetoothHostPairingController();
+ explicit BluetoothHostPairingController(
+ const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner);
~BluetoothHostPairingController() override;
private:
@@ -61,6 +64,7 @@ class BluetoothHostPairingController
void OnSendError(const std::string& error_message);
void OnReceiveError(device::BluetoothSocket::ErrorReason reason,
const std::string& error_message);
+ void PowerOffAdapterIfApplicable(const std::vector<InputDeviceInfo>& devices);
// HostPairingController:
void AddObserver(Observer* observer) override;
@@ -116,6 +120,7 @@ class BluetoothHostPairingController
scoped_refptr<device::BluetoothSocket> controller_socket_;
scoped_ptr<ProtoDecoder> proto_decoder_;
+ scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
base::ThreadChecker thread_checker_;
base::ObserverList<Observer> observers_;
base::WeakPtrFactory<BluetoothHostPairingController> ptr_factory_;
« no previous file with comments | « components/pairing/DEPS ('k') | components/pairing/bluetooth_host_pairing_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698