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 <limits> | 7 #include <limits> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 scoped_ptr<base::ListValue> devices = | 280 scoped_ptr<base::ListValue> devices = |
281 CreateApiDeviceList(params->extension, params->filters); | 281 CreateApiDeviceList(params->extension, params->filters); |
282 params->callback.Run(devices.Pass()); | 282 params->callback.Run(devices.Pass()); |
283 } | 283 } |
284 pending_enumerations_.clear(); | 284 pending_enumerations_.clear(); |
285 } | 285 } |
286 | 286 |
287 void HidDeviceManager::DispatchEvent(const std::string& event_name, | 287 void HidDeviceManager::DispatchEvent(const std::string& event_name, |
288 scoped_ptr<base::ListValue> event_args, | 288 scoped_ptr<base::ListValue> event_args, |
289 scoped_refptr<HidDeviceInfo> device_info) { | 289 scoped_refptr<HidDeviceInfo> device_info) { |
290 scoped_ptr<Event> event(new Event(event_name, event_args.Pass())); | 290 scoped_ptr<Event> event( |
| 291 new Event(events::UNKNOWN, event_name, event_args.Pass())); |
291 event->will_dispatch_callback = | 292 event->will_dispatch_callback = |
292 base::Bind(&WillDispatchDeviceEvent, device_info); | 293 base::Bind(&WillDispatchDeviceEvent, device_info); |
293 event_router_->BroadcastEvent(event.Pass()); | 294 event_router_->BroadcastEvent(event.Pass()); |
294 } | 295 } |
295 | 296 |
296 } // namespace extensions | 297 } // namespace extensions |
OLD | NEW |