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

Side by Side Diff: device/bluetooth/bluetooth_adapter_factory.h

Issue 11075006: Moved bluetooth adapter files to device/bluetooth/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: renamed 'bluetooth' target to 'device_bluetooth'. Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_
6 #define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 11
12 namespace chromeos { 12 namespace device {
13 13
14 class BluetoothAdapter; 14 class BluetoothAdapter;
15 15
16 // BluetoothAdapterFactory is a class that contains static methods, which 16 // BluetoothAdapterFactory is a class that contains static methods, which
17 // instantiate either a specific bluetooth adapter, or the generic "default 17 // instantiate either a specific bluetooth adapter, or the generic "default
18 // adapter" which may change depending on availability. 18 // adapter" which may change depending on availability.
19 class BluetoothAdapterFactory { 19 class BluetoothAdapterFactory {
20 public: 20 public:
21 // Returns the shared instance for the default adapter, whichever that may 21 // Returns the shared instance for the default adapter, whichever that may
22 // be at the time. Use IsPresent() and the AdapterPresentChanged() observer 22 // be at the time. Check the returned scoped_refptr does not point to NULL and
23 // method to determine whether an adapter is actually available or not. 23 // use IsPresent() and the AdapterPresentChanged() observer method to
24 // determine whether an adapter is actually available or not.
24 static scoped_refptr<BluetoothAdapter> DefaultAdapter(); 25 static scoped_refptr<BluetoothAdapter> DefaultAdapter();
25 26
26 // Creates an instance for a specific adapter at address |address|. 27 // Creates an instance for a specific adapter at address |address|.
27 static BluetoothAdapter* Create(const std::string& address); 28 static BluetoothAdapter* Create(const std::string& address);
28 }; 29 };
29 30
30 } // namespace chromeos 31 } // namespace device
31 32
32 #endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_ 33 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698