OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef MEDIA_MIDI_MIDI_MANAGER_ANDROID_H_ | 5 #ifndef MEDIA_MIDI_MIDI_MANAGER_ANDROID_H_ |
6 #define MEDIA_MIDI_MIDI_MANAGER_ANDROID_H_ | 6 #define MEDIA_MIDI_MIDI_MANAGER_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 #include <stdint.h> | 10 #include <stdint.h> |
11 | 11 |
12 #include <memory> | 12 #include <memory> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/android/scoped_java_ref.h" | 15 #include "base/android/scoped_java_ref.h" |
16 #include "base/containers/hash_tables.h" | 16 #include "base/containers/hash_tables.h" |
17 #include "base/memory/scoped_vector.h" | 17 #include "base/memory/scoped_vector.h" |
18 #include "base/synchronization/lock.h" | 18 #include "base/synchronization/lock.h" |
19 #include "base/time/time.h" | 19 #include "base/time/time.h" |
20 #include "media/midi/midi_input_port_android.h" | 20 #include "media/midi/midi_input_port_android.h" |
21 #include "media/midi/midi_manager.h" | 21 #include "media/midi/midi_manager.h" |
22 #include "media/midi/midi_scheduler.h" | 22 #include "media/midi/midi_scheduler.h" |
23 | 23 |
24 namespace media { | |
25 namespace midi { | 24 namespace midi { |
26 | 25 |
27 class MidiDeviceAndroid; | 26 class MidiDeviceAndroid; |
28 class MidiOutputPortAndroid; | 27 class MidiOutputPortAndroid; |
29 | 28 |
30 // MidiManagerAndroid is a MidiManager subclass for Android M or newer. For | 29 // MidiManagerAndroid is a MidiManager subclass for Android M or newer. For |
31 // older android OSes, we use MidiManagerUsb. | 30 // older android OSes, we use MidiManagerUsb. |
32 class MidiManagerAndroid final : public MidiManager, | 31 class MidiManagerAndroid final : public MidiManager, |
33 public MidiInputPortAndroid::Delegate { | 32 public MidiInputPortAndroid::Delegate { |
34 public: | 33 public: |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 86 |
88 base::android::ScopedJavaGlobalRef<jobject> raw_manager_; | 87 base::android::ScopedJavaGlobalRef<jobject> raw_manager_; |
89 | 88 |
90 // Lock to ensure the MidiScheduler is being destructed only once in | 89 // Lock to ensure the MidiScheduler is being destructed only once in |
91 // Finalize() on Chrome_IOThread. | 90 // Finalize() on Chrome_IOThread. |
92 base::Lock scheduler_lock_; | 91 base::Lock scheduler_lock_; |
93 std::unique_ptr<MidiScheduler> scheduler_; // GUARDED_BY(scheduler_lock_) | 92 std::unique_ptr<MidiScheduler> scheduler_; // GUARDED_BY(scheduler_lock_) |
94 }; | 93 }; |
95 | 94 |
96 } // namespace midi | 95 } // namespace midi |
97 } // namespace media | |
98 | 96 |
99 #endif // MEDIA_MIDI_MIDI_MANAGER_ANDROID_H_ | 97 #endif // MEDIA_MIDI_MIDI_MANAGER_ANDROID_H_ |
OLD | NEW |