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
3 // found in the LICENSE file.
5 #ifndef MEDIA_MIDI_MIDI_INPUT_PORT_ANDROID_H_
6 #define MEDIA_MIDI_MIDI_INPUT_PORT_ANDROID_H_
10 #include "base/android/scoped_java_ref.h"
11 #include "base/time/time.h"
16 class MidiInputPortAndroid final
{
20 virtual ~Delegate() {}
21 virtual void OnReceivedData(MidiInputPortAndroid
* port
,
24 base::TimeTicks time
) = 0;
26 MidiInputPortAndroid(JNIEnv
* env
, jobject raw
, Delegate
* delegate
);
27 ~MidiInputPortAndroid();
29 // Returns true when the operation succeeds.
33 // Called by the Java world.
34 void OnData(JNIEnv
* env
,
41 static bool Register(JNIEnv
* env
);
44 base::android::ScopedJavaGlobalRef
<jobject
> raw_port_
;
45 Delegate
* const delegate_
;
51 #endif // MEDIA_MIDI_MIDI_INPUT_PORT_ANDROID_H_