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 "media/midi/usb_midi_device_factory_android.h" | 5 #include "media/midi/usb_midi_device_factory_android.h" |
6 | 6 |
7 #include <jni.h> | 7 #include <jni.h> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
14 #include "base/memory/scoped_vector.h" | 14 #include "base/memory/scoped_vector.h" |
15 #include "base/memory/weak_ptr.h" | |
16 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
17 #include "base/synchronization/lock.h" | 16 #include "base/synchronization/lock.h" |
18 #include "jni/UsbMidiDeviceFactoryAndroid_jni.h" | 17 #include "jni/UsbMidiDeviceFactoryAndroid_jni.h" |
19 #include "media/midi/usb_midi_device_android.h" | 18 #include "media/midi/usb_midi_device_android.h" |
20 | 19 |
21 namespace media { | 20 namespace media { |
22 | 21 |
23 namespace { | 22 namespace { |
24 | 23 |
25 typedef UsbMidiDevice::Factory::Callback Callback; | 24 typedef UsbMidiDevice::Factory::Callback Callback; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 } | 68 } |
70 | 69 |
71 callback_.Run(true, &devices_to_pass); | 70 callback_.Run(true, &devices_to_pass); |
72 } | 71 } |
73 | 72 |
74 bool UsbMidiDeviceFactoryAndroid::RegisterUsbMidiDeviceFactory(JNIEnv* env) { | 73 bool UsbMidiDeviceFactoryAndroid::RegisterUsbMidiDeviceFactory(JNIEnv* env) { |
75 return RegisterNativesImpl(env); | 74 return RegisterNativesImpl(env); |
76 } | 75 } |
77 | 76 |
78 } // namespace media | 77 } // namespace media |
OLD | NEW |