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

Unified Diff: components/arc/bluetooth/arc_bluetooth_bridge.h

Issue 2324463004: arc: bluetooth: Implement set discoverable state (Closed)
Patch Set: Created 4 years, 3 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 | components/arc/bluetooth/arc_bluetooth_bridge.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/bluetooth/arc_bluetooth_bridge.h
diff --git a/components/arc/bluetooth/arc_bluetooth_bridge.h b/components/arc/bluetooth/arc_bluetooth_bridge.h
index c1a6ade02b395302cca0302fb0cefdd8e0974edb..fd98791b1995e9c1c65c4eb937b3297d873d626f 100644
--- a/components/arc/bluetooth/arc_bluetooth_bridge.h
+++ b/components/arc/bluetooth/arc_bluetooth_bridge.h
@@ -10,9 +10,11 @@
#include <memory>
#include <string>
#include <unordered_map>
+#include <unordered_set>
#include <vector>
#include "base/callback.h"
+#include "base/timer/timer.h"
#include "components/arc/arc_bridge_service.h"
#include "components/arc/arc_service.h"
#include "components/arc/common/bluetooth.mojom.h"
@@ -360,6 +362,9 @@ class ArcBluetoothBridge
const base::Closure& success_callback,
const ErrorCallback& error_callback);
+ void OnSetDiscoverable(bool discoverable, bool success, uint32_t timeout);
+ void SetDiscoverable(bool discoverable, uint32_t timeout);
+
bool CalledOnValidThread();
mojo::Binding<mojom::BluetoothHost> binding_;
@@ -380,6 +385,8 @@ class ArcBluetoothBridge
int32_t gatt_server_attribute_next_handle_ = 0;
// Keeps track of all devices which initiated a GATT connection to us.
std::unordered_set<std::string> gatt_connection_cache_;
+ // Timer to turn adapter discoverable off.
+ base::OneShotTimer discoverable_off_timer_;
base::ThreadChecker thread_checker_;
« no previous file with comments | « no previous file | components/arc/bluetooth/arc_bluetooth_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698