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

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

Issue 400843002: Clean up Bluetooth API implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove a trailing return Created 6 years, 5 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_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_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"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 class BluetoothGetAdapterStateFunction : public BluetoothExtensionFunction { 69 class BluetoothGetAdapterStateFunction : public BluetoothExtensionFunction {
70 public: 70 public:
71 DECLARE_EXTENSION_FUNCTION("bluetooth.getAdapterState", 71 DECLARE_EXTENSION_FUNCTION("bluetooth.getAdapterState",
72 BLUETOOTH_GETADAPTERSTATE) 72 BLUETOOTH_GETADAPTERSTATE)
73 73
74 protected: 74 protected:
75 virtual ~BluetoothGetAdapterStateFunction(); 75 virtual ~BluetoothGetAdapterStateFunction();
76 76
77 // BluetoothExtensionFunction: 77 // BluetoothExtensionFunction:
78 virtual bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) OVERRIDE; 78 virtual void DoWork(scoped_refptr<device::BluetoothAdapter> adapter) OVERRIDE;
79 }; 79 };
80 80
81 class BluetoothGetDevicesFunction : public BluetoothExtensionFunction { 81 class BluetoothGetDevicesFunction : public BluetoothExtensionFunction {
82 public: 82 public:
83 DECLARE_EXTENSION_FUNCTION("bluetooth.getDevices", BLUETOOTH_GETDEVICES) 83 DECLARE_EXTENSION_FUNCTION("bluetooth.getDevices", BLUETOOTH_GETDEVICES)
84 84
85 protected: 85 protected:
86 virtual ~BluetoothGetDevicesFunction(); 86 virtual ~BluetoothGetDevicesFunction();
87 87
88 // BluetoothExtensionFunction: 88 // BluetoothExtensionFunction:
89 virtual bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) OVERRIDE; 89 virtual void DoWork(scoped_refptr<device::BluetoothAdapter> adapter) OVERRIDE;
90 }; 90 };
91 91
92 class BluetoothGetDeviceFunction : public BluetoothExtensionFunction { 92 class BluetoothGetDeviceFunction : public BluetoothExtensionFunction {
93 public: 93 public:
94 DECLARE_EXTENSION_FUNCTION("bluetooth.getDevice", BLUETOOTH_GETDEVICE) 94 DECLARE_EXTENSION_FUNCTION("bluetooth.getDevice", BLUETOOTH_GETDEVICE)
95 95
96 // BluetoothExtensionFunction: 96 // BluetoothExtensionFunction:
97 virtual bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) OVERRIDE; 97 virtual void DoWork(scoped_refptr<device::BluetoothAdapter> adapter) OVERRIDE;
98 98
99 protected: 99 protected:
100 virtual ~BluetoothGetDeviceFunction(); 100 virtual ~BluetoothGetDeviceFunction();
101 }; 101 };
102 102
103 class BluetoothStartDiscoveryFunction : public BluetoothExtensionFunction { 103 class BluetoothStartDiscoveryFunction : public BluetoothExtensionFunction {
104 public: 104 public:
105 DECLARE_EXTENSION_FUNCTION("bluetooth.startDiscovery", 105 DECLARE_EXTENSION_FUNCTION("bluetooth.startDiscovery",
106 BLUETOOTH_STARTDISCOVERY) 106 BLUETOOTH_STARTDISCOVERY)
107 107
108 protected: 108 protected:
109 virtual ~BluetoothStartDiscoveryFunction() {} 109 virtual ~BluetoothStartDiscoveryFunction() {}
110 110
111 // BluetoothExtensionFunction: 111 // BluetoothExtensionFunction:
112 virtual bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) OVERRIDE; 112 virtual void DoWork(scoped_refptr<device::BluetoothAdapter> adapter) OVERRIDE;
113 113
114 private: 114 private:
115 void OnSuccessCallback(); 115 void OnSuccessCallback();
116 void OnErrorCallback(); 116 void OnErrorCallback();
117 }; 117 };
118 118
119 class BluetoothStopDiscoveryFunction : public BluetoothExtensionFunction { 119 class BluetoothStopDiscoveryFunction : public BluetoothExtensionFunction {
120 public: 120 public:
121 DECLARE_EXTENSION_FUNCTION("bluetooth.stopDiscovery", BLUETOOTH_STOPDISCOVERY) 121 DECLARE_EXTENSION_FUNCTION("bluetooth.stopDiscovery", BLUETOOTH_STOPDISCOVERY)
122 122
123 protected: 123 protected:
124 virtual ~BluetoothStopDiscoveryFunction() {} 124 virtual ~BluetoothStopDiscoveryFunction() {}
125 125
126 // BluetoothExtensionFunction: 126 // BluetoothExtensionFunction:
127 virtual bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) OVERRIDE; 127 virtual void DoWork(scoped_refptr<device::BluetoothAdapter> adapter) OVERRIDE;
128 128
129 private: 129 private:
130 void OnSuccessCallback(); 130 void OnSuccessCallback();
131 void OnErrorCallback(); 131 void OnErrorCallback();
132 }; 132 };
133 133
134 } // namespace api 134 } // namespace api
135 } // namespace extensions 135 } // namespace extensions
136 136
137 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ 137 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698