OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/hid/hid_api.h" | 5 #include "chrome/browser/extensions/api/hid/hid_api.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "chrome/browser/extensions/api/api_resource_manager.h" | 10 #include "chrome/browser/extensions/api/api_resource_manager.h" |
11 #include "chrome/browser/extensions/api/hid/hid_device_resource.h" | 11 #include "chrome/browser/extensions/api/hid/hid_device_resource.h" |
| 12 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/common/extensions/api/hid.h" | 13 #include "chrome/common/extensions/api/hid.h" |
13 #include "chrome/common/extensions/permissions/usb_device_permission.h" | 14 #include "chrome/common/extensions/permissions/usb_device_permission.h" |
14 #include "device/hid/hid_connection.h" | 15 #include "device/hid/hid_connection.h" |
15 #include "device/hid/hid_device_info.h" | 16 #include "device/hid/hid_device_info.h" |
16 #include "device/hid/hid_service.h" | 17 #include "device/hid/hid_service.h" |
17 #include "extensions/common/permissions/permissions_data.h" | 18 #include "extensions/common/permissions/permissions_data.h" |
18 #include "net/base/io_buffer.h" | 19 #include "net/base/io_buffer.h" |
19 | 20 |
20 namespace hid = extensions::api::hid; | 21 namespace hid = extensions::api::hid; |
21 | 22 |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 | 317 |
317 void HidSendFeatureReportFunction::OnFinished(bool success, size_t bytes) { | 318 void HidSendFeatureReportFunction::OnFinished(bool success, size_t bytes) { |
318 if (!success) { | 319 if (!success) { |
319 CompleteWithError(kErrorTransfer); | 320 CompleteWithError(kErrorTransfer); |
320 return; | 321 return; |
321 } | 322 } |
322 AsyncWorkCompleted(); | 323 AsyncWorkCompleted(); |
323 } | 324 } |
324 | 325 |
325 } // namespace extensions | 326 } // namespace extensions |
OLD | NEW |