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

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

Issue 10392181: Implement serial API for Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: From -> At. Created 8 years, 6 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 #include "chrome/browser/extensions/api/usb/usb_api.h" 5 #include "chrome/browser/extensions/api/usb/usb_api.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/extensions/api/api_resource_controller.h" 10 #include "chrome/browser/extensions/api/api_resource_controller.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 UsbCloseDeviceFunction::~UsbCloseDeviceFunction() {} 67 UsbCloseDeviceFunction::~UsbCloseDeviceFunction() {}
68 68
69 bool UsbCloseDeviceFunction::Prepare() { 69 bool UsbCloseDeviceFunction::Prepare() {
70 parameters_ = CloseDevice::Params::Create(*args_); 70 parameters_ = CloseDevice::Params::Create(*args_);
71 EXTENSION_FUNCTION_VALIDATE(parameters_.get()); 71 EXTENSION_FUNCTION_VALIDATE(parameters_.get());
72 return true; 72 return true;
73 } 73 }
74 74
75 void UsbCloseDeviceFunction::Work() { 75 void UsbCloseDeviceFunction::Work() {
76 controller()->RemoveAPIResource(parameters_->device.handle); 76 controller()->RemoveUsbDeviceResource(parameters_->device.handle);
77 } 77 }
78 78
79 bool UsbCloseDeviceFunction::Respond() { 79 bool UsbCloseDeviceFunction::Respond() {
80 return true; 80 return true;
81 } 81 }
82 82
83 UsbControlTransferFunction::UsbControlTransferFunction() {} 83 UsbControlTransferFunction::UsbControlTransferFunction() {}
84 84
85 UsbControlTransferFunction::~UsbControlTransferFunction() {} 85 UsbControlTransferFunction::~UsbControlTransferFunction() {}
86 86
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 if (device) { 140 if (device) {
141 device->InterruptTransfer(parameters_->transfer_info); 141 device->InterruptTransfer(parameters_->transfer_info);
142 } 142 }
143 } 143 }
144 144
145 bool UsbInterruptTransferFunction::Respond() { 145 bool UsbInterruptTransferFunction::Respond() {
146 return true; 146 return true;
147 } 147 }
148 148
149 } // namespace extensions 149 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/socket/socket_api.cc ('k') | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698