| 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 #ifndef MEDIA_MIDI_USB_MIDI_DEVICE_FACTORY_ANDROID_H_ | 5 #ifndef MEDIA_MIDI_USB_MIDI_DEVICE_FACTORY_ANDROID_H_ |
| 6 #define MEDIA_MIDI_USB_MIDI_DEVICE_FACTORY_ANDROID_H_ | 6 #define MEDIA_MIDI_USB_MIDI_DEVICE_FACTORY_ANDROID_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/android/scoped_java_ref.h" | 11 #include "base/android/scoped_java_ref.h" |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "media/midi/usb_midi_device.h" | 15 #include "media/midi/usb_midi_device.h" |
| 16 #include "media/midi/usb_midi_export.h" | 16 #include "media/midi/usb_midi_export.h" |
| 17 | 17 |
| 18 namespace media { | |
| 19 namespace midi { | 18 namespace midi { |
| 20 | 19 |
| 21 // This class enumerates UsbMidiDevices. | 20 // This class enumerates UsbMidiDevices. |
| 22 class USB_MIDI_EXPORT UsbMidiDeviceFactoryAndroid | 21 class USB_MIDI_EXPORT UsbMidiDeviceFactoryAndroid |
| 23 : public UsbMidiDevice::Factory { | 22 : public UsbMidiDevice::Factory { |
| 24 public: | 23 public: |
| 25 UsbMidiDeviceFactoryAndroid(); | 24 UsbMidiDeviceFactoryAndroid(); |
| 26 ~UsbMidiDeviceFactoryAndroid() override; | 25 ~UsbMidiDeviceFactoryAndroid() override; |
| 27 | 26 |
| 28 // UsbMidiDevice::Factory implementation. | 27 // UsbMidiDevice::Factory implementation. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 47 private: | 46 private: |
| 48 base::android::ScopedJavaGlobalRef<jobject> raw_factory_; | 47 base::android::ScopedJavaGlobalRef<jobject> raw_factory_; |
| 49 // Not owned. | 48 // Not owned. |
| 50 UsbMidiDeviceDelegate* delegate_; | 49 UsbMidiDeviceDelegate* delegate_; |
| 51 Callback callback_; | 50 Callback callback_; |
| 52 | 51 |
| 53 DISALLOW_COPY_AND_ASSIGN(UsbMidiDeviceFactoryAndroid); | 52 DISALLOW_COPY_AND_ASSIGN(UsbMidiDeviceFactoryAndroid); |
| 54 }; | 53 }; |
| 55 | 54 |
| 56 } // namespace midi | 55 } // namespace midi |
| 57 } // namespace media | |
| 58 | 56 |
| 59 #endif // MEDIA_MIDI_USB_MIDI_DEVICE_FACTORY_ANDROID_H_ | 57 #endif // MEDIA_MIDI_USB_MIDI_DEVICE_FACTORY_ANDROID_H_ |
| OLD | NEW |