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

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

Issue 10899037: Refactoring bluetooth API code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename to BluetoothAdapterChromeOs Created 8 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
Index: chrome/browser/chromeos/bluetooth/bluetooth_adapter_factory.h
diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_adapter_factory.h b/chrome/browser/chromeos/bluetooth/bluetooth_adapter_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..79c9da19208ce2b7757190cf016917735ef644c4
--- /dev/null
+++ b/chrome/browser/chromeos/bluetooth/bluetooth_adapter_factory.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2012 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_ADAPTER_FACTORY_H_
+#define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_
+
+#include <string>
+
+#include "base/memory/ref_counted.h"
+
+namespace chromeos {
+
+class BluetoothAdapter;
+
+class BluetoothAdapterFactory {
keybuk 2012/09/17 22:19:43 Would a "Factory" be an appropriate class to add a
youngki 2012/09/18 18:19:56 Is that a new method that you want to add? I think
keybuk1 2012/09/18 18:42:30 yes, it's a method I have in a CL here that will b
youngki 2012/09/19 01:13:55 I think we could just leave the name "Factory" for
+ public:
+ // Returns the shared instance for the default adapter, whichever that may
+ // be at the time. Use IsPresent() and the AdapterPresentChanged() observer
+ // method to determine whether an adapter is actually available or not.
+ static scoped_refptr<BluetoothAdapter> DefaultAdapter();
+
+ // Creates an instance for a specific adapter named by |address|, which
+ // may be the bluetooth address of the adapter or a device name such as
+ // "hci0".
keybuk 2012/09/17 22:19:43 I'm not sure what to do about the "device name" bi
youngki 2012/09/18 18:19:56 We could move this method to BluetoothAdapterChrom
keybuk1 2012/09/18 18:42:30 Actually I think we should just drop that from the
youngki 2012/09/19 01:13:55 Done.
+ static BluetoothAdapter* Create(const std::string& address);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698