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

Side by Side Diff: chrome/browser/extensions/api/bluetooth/bluetooth_extension_function.h

Issue 11743024: Implemented BluetoothExtensionFunction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 7 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_EXTENSION_FUNCTION_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_EXTENSION_FUNCTION_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "chrome/browser/extensions/extension_function.h"
10
11 namespace device {
12
13 class BluetoothAdapter;
14
15 } // namespace device
16
17 namespace extensions {
18
19 namespace api {
20
21 // Base class for bluetooth extension functions. This class initializes
22 // bluetooth adapter and calls DoWork() implemented by individual bluetooth
23 // extension functions.
24 class BluetoothExtensionFunction : public AsyncExtensionFunction {
25 public:
26 BluetoothExtensionFunction();
27
28 protected:
29 virtual ~BluetoothExtensionFunction();
30
31 // ExtensionFunction:
32 virtual bool RunImpl() OVERRIDE;
33
34 private:
35 // Implemented by individual bluetooth extension functions, called
36 // automatically once |adapter| has been initialized.
37 virtual bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) = 0;
38 };
39
40 } // namespace api
41
42 } // namespace extensions
43
44 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_EXTENSION_FUNCTION_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698