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_ANDROID_H_ | 5 #ifndef MEDIA_MIDI_USB_MIDI_DEVICE_ANDROID_H_ |
6 #define MEDIA_MIDI_USB_MIDI_DEVICE_ANDROID_H_ | 6 #define MEDIA_MIDI_USB_MIDI_DEVICE_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <memory> |
10 #include <string> | 11 #include <string> |
11 #include <vector> | 12 #include <vector> |
12 | 13 |
13 #include "base/android/scoped_java_ref.h" | 14 #include "base/android/scoped_java_ref.h" |
14 #include "base/callback.h" | 15 #include "base/callback.h" |
15 #include "base/macros.h" | 16 #include "base/macros.h" |
16 #include "media/midi/usb_midi_device.h" | 17 #include "media/midi/usb_midi_device.h" |
17 #include "media/midi/usb_midi_export.h" | 18 #include "media/midi/usb_midi_export.h" |
18 | 19 |
19 namespace media { | 20 namespace media { |
20 namespace midi { | 21 namespace midi { |
21 | 22 |
22 class USB_MIDI_EXPORT UsbMidiDeviceAndroid : public UsbMidiDevice { | 23 class USB_MIDI_EXPORT UsbMidiDeviceAndroid : public UsbMidiDevice { |
23 public: | 24 public: |
24 static scoped_ptr<Factory> CreateFactory(); | 25 static std::unique_ptr<Factory> CreateFactory(); |
25 | 26 |
26 UsbMidiDeviceAndroid(const base::android::JavaRef<jobject>& raw_device, | 27 UsbMidiDeviceAndroid(const base::android::JavaRef<jobject>& raw_device, |
27 UsbMidiDeviceDelegate* delegate); | 28 UsbMidiDeviceDelegate* delegate); |
28 ~UsbMidiDeviceAndroid() override; | 29 ~UsbMidiDeviceAndroid() override; |
29 | 30 |
30 // UsbMidiDevice implementation. | 31 // UsbMidiDevice implementation. |
31 std::vector<uint8_t> GetDescriptors() override; | 32 std::vector<uint8_t> GetDescriptors() override; |
32 std::string GetManufacturer() override; | 33 std::string GetManufacturer() override; |
33 std::string GetProductName() override; | 34 std::string GetProductName() override; |
34 std::string GetDeviceVersion() override; | 35 std::string GetDeviceVersion() override; |
(...skipping 22 matching lines...) Expand all Loading... |
57 std::string product_; | 58 std::string product_; |
58 std::string device_version_; | 59 std::string device_version_; |
59 | 60 |
60 DISALLOW_IMPLICIT_CONSTRUCTORS(UsbMidiDeviceAndroid); | 61 DISALLOW_IMPLICIT_CONSTRUCTORS(UsbMidiDeviceAndroid); |
61 }; | 62 }; |
62 | 63 |
63 } // namespace midi | 64 } // namespace midi |
64 } // namespace media | 65 } // namespace media |
65 | 66 |
66 #endif // MEDIA_MIDI_USB_MIDI_DEVICE_ANDROID_H_ | 67 #endif // MEDIA_MIDI_USB_MIDI_DEVICE_ANDROID_H_ |
OLD | NEW |