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

Side by Side Diff: chrome/browser/extensions/api/usb/usb_api.h

Issue 12226137: Fix missing callback chaining in UsbService. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/usb/usb_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_USB_USB_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_USB_USB_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_USB_USB_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_USB_USB_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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 static void SetDeviceForTest(UsbDevice* device); 64 static void SetDeviceForTest(UsbDevice* device);
65 65
66 protected: 66 protected:
67 virtual ~UsbFindDevicesFunction(); 67 virtual ~UsbFindDevicesFunction();
68 68
69 virtual bool Prepare() OVERRIDE; 69 virtual bool Prepare() OVERRIDE;
70 virtual void AsyncWorkStart() OVERRIDE; 70 virtual void AsyncWorkStart() OVERRIDE;
71 71
72 private: 72 private:
73 void OnCompleted();
74
75 scoped_ptr<base::ListValue> result_;
76 std::vector<scoped_refptr<UsbDevice> > devices_;
73 scoped_ptr<extensions::api::usb::FindDevices::Params> parameters_; 77 scoped_ptr<extensions::api::usb::FindDevices::Params> parameters_;
74 }; 78 };
75 79
76 class UsbCloseDeviceFunction : public UsbAsyncApiFunction { 80 class UsbCloseDeviceFunction : public UsbAsyncApiFunction {
77 public: 81 public:
78 DECLARE_EXTENSION_FUNCTION("usb.closeDevice", USB_CLOSEDEVICE) 82 DECLARE_EXTENSION_FUNCTION("usb.closeDevice", USB_CLOSEDEVICE)
79 83
80 UsbCloseDeviceFunction(); 84 UsbCloseDeviceFunction();
81 85
82 protected: 86 protected:
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 virtual bool Prepare() OVERRIDE; 211 virtual bool Prepare() OVERRIDE;
208 virtual void AsyncWorkStart() OVERRIDE; 212 virtual void AsyncWorkStart() OVERRIDE;
209 213
210 private: 214 private:
211 scoped_ptr<extensions::api::usb::IsochronousTransfer::Params> parameters_; 215 scoped_ptr<extensions::api::usb::IsochronousTransfer::Params> parameters_;
212 }; 216 };
213 217
214 } // namespace extensions 218 } // namespace extensions
215 219
216 #endif // CHROME_BROWSER_EXTENSIONS_API_USB_USB_API_H_ 220 #endif // CHROME_BROWSER_EXTENSIONS_API_USB_USB_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/usb/usb_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698