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

Unified Diff: chrome/browser/chromeos/bluetooth/bluetooth_manager.h

Issue 8233042: Chrome OS: Attach bluetooth UI to device discovery API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: replace empty device names with mac address Created 9 years, 2 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
Index: chrome/browser/chromeos/bluetooth/bluetooth_manager.h
diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_manager.h b/chrome/browser/chromeos/bluetooth/bluetooth_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..5a15121a0d7cab976b9347d8fdbd02b1e787a62e
--- /dev/null
+++ b/chrome/browser/chromeos/bluetooth/bluetooth_manager.h
@@ -0,0 +1,54 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_MANAGER_H_
+#define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_MANAGER_H_
+
+#include <string>
+#include <vector>
+
+#include "base/basictypes.h"
+
+namespace chromeos {
+
+class BluetoothAdapter;
+
+// BluetoothManager provides the Chrome OS bluetooth API.
+// This API is simplified relative to what's available via D-Bus.
+// We'll export additional functionality as needed.
+class BluetoothManager {
+ public:
+ // Interface for observing changes from the bluetooth manager.
+ class Observer {
+ public:
+ // Notification that the default adapter has changed. If |adapter| is NULL,
+ // it means that there are no longer any adapters.
+ // Clients should not cache this pointer.
+ virtual void DefaultAdapterChanged(BluetoothAdapter* adapter) = 0;
+ virtual ~Observer() {}
+ };
+
+ // Adds and removes the observer.
+ virtual void AddObserver(Observer* observer) = 0;
+ virtual void RemoveObserver(Observer* observer) = 0;
+
+ // Returns the default local bluetooth adapter or NULL if there is none.
+ // Clients should not cache this pointer.
+ virtual BluetoothAdapter* DefaultAdapter() = 0;
+
+ static void Initialize();
+ static void Shutdown();
+ static BluetoothManager* GetInstance();
+
+ protected:
+ BluetoothManager();
+ virtual ~BluetoothManager();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(BluetoothManager);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698