| 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 "extensions/browser/api/hid/hid_device_manager.h" | 5 #include "extensions/browser/api/hid/hid_device_manager.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <utility> | 10 #include <utility> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
| 14 #include "base/location.h" | 14 #include "base/location.h" |
| 15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
| 16 #include "base/single_thread_task_runner.h" | 16 #include "base/single_thread_task_runner.h" |
| 17 #include "base/threading/thread_task_runner_handle.h" | 17 #include "base/threading/thread_task_runner_handle.h" |
| 18 #include "device/core/device_client.h" | 18 #include "device/base/device_client.h" |
| 19 #include "device/hid/hid_device_filter.h" | 19 #include "device/hid/hid_device_filter.h" |
| 20 #include "device/hid/hid_service.h" | 20 #include "device/hid/hid_service.h" |
| 21 #include "extensions/browser/api/device_permissions_manager.h" | 21 #include "extensions/browser/api/device_permissions_manager.h" |
| 22 #include "extensions/common/permissions/permissions_data.h" | 22 #include "extensions/common/permissions/permissions_data.h" |
| 23 #include "extensions/common/permissions/usb_device_permission.h" | 23 #include "extensions/common/permissions/usb_device_permission.h" |
| 24 | 24 |
| 25 namespace hid = extensions::api::hid; | 25 namespace hid = extensions::api::hid; |
| 26 | 26 |
| 27 using device::HidDeviceFilter; | 27 using device::HidDeviceFilter; |
| 28 using device::HidDeviceId; | 28 using device::HidDeviceId; |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 std::unique_ptr<base::ListValue> event_args, | 335 std::unique_ptr<base::ListValue> event_args, |
| 336 scoped_refptr<HidDeviceInfo> device_info) { | 336 scoped_refptr<HidDeviceInfo> device_info) { |
| 337 std::unique_ptr<Event> event( | 337 std::unique_ptr<Event> event( |
| 338 new Event(histogram_value, event_name, std::move(event_args))); | 338 new Event(histogram_value, event_name, std::move(event_args))); |
| 339 event->will_dispatch_callback = base::Bind( | 339 event->will_dispatch_callback = base::Bind( |
| 340 &WillDispatchDeviceEvent, weak_factory_.GetWeakPtr(), device_info); | 340 &WillDispatchDeviceEvent, weak_factory_.GetWeakPtr(), device_info); |
| 341 event_router_->BroadcastEvent(std::move(event)); | 341 event_router_->BroadcastEvent(std::move(event)); |
| 342 } | 342 } |
| 343 | 343 |
| 344 } // namespace extensions | 344 } // namespace extensions |
| OLD | NEW |