Removing dead code from MockScreenOrientationController.
[chromium-blink-merge.git] / media / midi / usb_midi_device_factory_android.h
blob63a9eb32f68f12a4da4699068dd0bd4d9052ff12
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
3 // found in the LICENSE file.
5 #ifndef MEDIA_MIDI_USB_MIDI_DEVICE_FACTORY_ANDROID_H_
6 #define MEDIA_MIDI_USB_MIDI_DEVICE_FACTORY_ANDROID_H_
8 #include <jni.h>
9 #include <vector>
11 #include "base/android/scoped_java_ref.h"
12 #include "base/basictypes.h"
13 #include "base/callback.h"
14 #include "base/memory/scoped_vector.h"
15 #include "base/memory/weak_ptr.h"
16 #include "media/base/media_export.h"
17 #include "media/midi/usb_midi_device.h"
19 namespace media {
21 // This class enumerates UsbMidiDevices.
22 class MEDIA_EXPORT UsbMidiDeviceFactoryAndroid : public UsbMidiDevice::Factory {
23 public:
24 UsbMidiDeviceFactoryAndroid();
25 virtual ~UsbMidiDeviceFactoryAndroid();
27 // UsbMidiDevice::Factory implementation.
28 virtual void EnumerateDevices(UsbMidiDeviceDelegate* delegate,
29 Callback callback) OVERRIDE;
31 void OnUsbMidiDeviceRequestDone(JNIEnv* env,
32 jobject caller,
33 jobjectArray devices);
35 static bool RegisterUsbMidiDeviceFactory(JNIEnv* env);
37 private:
38 base::android::ScopedJavaGlobalRef<jobject> raw_factory_;
39 // Not owned.
40 UsbMidiDeviceDelegate* delegate_;
41 Callback callback_;
43 DISALLOW_COPY_AND_ASSIGN(UsbMidiDeviceFactoryAndroid);
46 } // namespace media
48 #endif // MEDIA_MIDI_USB_MIDI_DEVICE_FACTORY_ANDROID_H_