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

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

Issue 258783002: Extracted UsbService as interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed chromeos issue. Created 6 years, 7 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
« 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 #include <vector> 9 #include <vector>
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 std::vector<scoped_refptr<usb_service::UsbDeviceHandle> > device_handles_; 83 std::vector<scoped_refptr<usb_service::UsbDeviceHandle> > device_handles_;
84 scoped_ptr<extensions::api::usb::FindDevices::Params> parameters_; 84 scoped_ptr<extensions::api::usb::FindDevices::Params> parameters_;
85 }; 85 };
86 86
87 class UsbGetDevicesFunction : public UsbAsyncApiFunction { 87 class UsbGetDevicesFunction : public UsbAsyncApiFunction {
88 public: 88 public:
89 DECLARE_EXTENSION_FUNCTION("usb.getDevices", USB_GETDEVICES) 89 DECLARE_EXTENSION_FUNCTION("usb.getDevices", USB_GETDEVICES)
90 90
91 UsbGetDevicesFunction(); 91 UsbGetDevicesFunction();
92 92
93 static void SetDeviceForTest(usb_service::UsbDevice* device);
94
95 virtual bool Prepare() OVERRIDE; 93 virtual bool Prepare() OVERRIDE;
96 virtual void AsyncWorkStart() OVERRIDE; 94 virtual void AsyncWorkStart() OVERRIDE;
97 95
98 protected: 96 protected:
99 virtual ~UsbGetDevicesFunction(); 97 virtual ~UsbGetDevicesFunction();
100 98
101 private: 99 private:
102 void EnumerationCompletedFileThread( 100 void EnumerationCompletedFileThread(
103 scoped_ptr<std::vector<scoped_refptr<usb_service::UsbDevice> > > devices); 101 scoped_ptr<std::vector<scoped_refptr<usb_service::UsbDevice> > > devices);
104 102
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 305
308 virtual bool Prepare() OVERRIDE; 306 virtual bool Prepare() OVERRIDE;
309 virtual void AsyncWorkStart() OVERRIDE; 307 virtual void AsyncWorkStart() OVERRIDE;
310 308
311 private: 309 private:
312 scoped_ptr<extensions::api::usb::ResetDevice::Params> parameters_; 310 scoped_ptr<extensions::api::usb::ResetDevice::Params> parameters_;
313 }; 311 };
314 } // namespace extensions 312 } // namespace extensions
315 313
316 #endif // CHROME_BROWSER_EXTENSIONS_API_USB_USB_API_H_ 314 #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