Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(483)

Unified Diff: media/midi/midi_manager.h

Issue 1276233005: [WebMIDI] Add "use-android-midi-api" flag for Android M+ devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/midi/midi_manager.h
diff --git a/media/midi/midi_manager.h b/media/midi/midi_manager.h
index 957c84d427f0dc85b291cd6b9cee188067dca5d7..c08c638b07e606e030b79c002b56f80b5ceb1f1c 100644
--- a/media/midi/midi_manager.h
+++ b/media/midi/midi_manager.h
@@ -68,12 +68,25 @@ class MIDI_EXPORT MidiManager {
public:
static const size_t kMaxPendingClientCount = 128;
+ class CreationOptions {
+ public:
+#if defined(OS_ANDROID)
+ bool use_native_midi_api() const { return use_native_midi_api_; }
+ void set_use_native_midi_api(bool b) { use_native_midi_api_ = b; }
+#endif // defined(OS_ANDROID)
+
+ private:
+#if defined(OS_ANDROID)
+ bool use_native_midi_api_ = false;
+#endif // defined(OS_ANDROID)
+ };
+
MidiManager();
virtual ~MidiManager();
// The constructor and the destructor will be called on the CrBrowserMain
// thread.
- static MidiManager* Create();
+ static MidiManager* Create(const CreationOptions&);
// A client calls StartSession() to receive and send MIDI data.
// If the session is ready to start, the MIDI system is lazily initialized

Powered by Google App Engine
This is Rietveld 408576698