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

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

Issue 2316353003: 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 1b3b6522c24467e1b77ccff5f0f67244b35badf7..e8b5d4939afb96413f5231c300f26b0ff9974eb8 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"
@@ -356,6 +358,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_;
@@ -376,6 +381,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