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

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

Issue 10915148: Change getDevices to use a DeviceCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test breakage 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 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 "chrome/browser/extensions/api/api_function.h" 10 #include "chrome/browser/extensions/api/api_function.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 #endif 79 #endif
80 80
81 protected: 81 protected:
82 virtual ~BluetoothGetDevicesFunction() {} 82 virtual ~BluetoothGetDevicesFunction() {}
83 83
84 // ExtensionFunction: 84 // ExtensionFunction:
85 virtual bool RunImpl() OVERRIDE; 85 virtual bool RunImpl() OVERRIDE;
86 86
87 private: 87 private:
88 #if defined(OS_CHROMEOS) 88 #if defined(OS_CHROMEOS)
89 void AddDeviceIfTrueCallback(ListValue* list, 89 void DispatchDeviceSearchResult(const chromeos::BluetoothDevice& device);
90 const chromeos::BluetoothDevice* device, 90 void ProvidesServiceCallback(const chromeos::BluetoothDevice* device,
91 bool shouldAdd); 91 bool providesService);
92 92
93 int callbacks_pending_; 93 int callbacks_pending_;
94 #endif 94 #endif
95 }; 95 };
96 96
97 class BluetoothGetServicesFunction : public AsyncExtensionFunction { 97 class BluetoothGetServicesFunction : public AsyncExtensionFunction {
98 public: 98 public:
99 DECLARE_EXTENSION_FUNCTION_NAME("experimental.bluetooth.getServices") 99 DECLARE_EXTENSION_FUNCTION_NAME("experimental.bluetooth.getServices")
100 100
101 protected: 101 protected:
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 private: 250 private:
251 void OnSuccessCallback(); 251 void OnSuccessCallback();
252 void OnErrorCallback(); 252 void OnErrorCallback();
253 #endif 253 #endif
254 }; 254 };
255 255
256 } // namespace api 256 } // namespace api
257 } // namespace extensions 257 } // namespace extensions
258 258
259 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ 259 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/bluetooth_event_router.cc ('k') | chrome/browser/extensions/api/bluetooth/bluetooth_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698