This sets up API to release OutputSurface from LTHClient.
[chromium-blink-merge.git] / media / midi / midi_output_port_android.h
blob5fe4b9de18413a39c038165d910f1815f342b07b
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_OUTPUT_PORT_ANDROID_H_
6 #define MEDIA_MIDI_MIDI_OUTPUT_PORT_ANDROID_H_
8 #include <jni.h>
9 #include <vector>
11 #include "base/android/scoped_java_ref.h"
12 #include "base/time/time.h"
14 namespace media {
15 namespace midi {
17 class MidiOutputPortAndroid final {
18 public:
19 MidiOutputPortAndroid(JNIEnv* env, jobject raw);
20 ~MidiOutputPortAndroid();
22 // Returns the when the operation succeeds or the port is already open.
23 bool Open();
24 void Close();
25 void Send(const std::vector<uint8>& data);
27 static bool Register(JNIEnv* env);
29 private:
30 base::android::ScopedJavaGlobalRef<jobject> raw_port_;
33 } // namespace midi
34 } // namespace media
36 #endif // MEDIA_MIDI_MIDI_OUTPUT_PORT_ANDROID_H_