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

Unified Diff: content/browser/media/midi_host.h

Issue 2566673002: Web MIDI: introduce MidiService class (Closed)
Patch Set: merge master Created 4 years 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
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/media/midi_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/midi_host.h
diff --git a/content/browser/media/midi_host.h b/content/browser/media/midi_host.h
index 95e69031f23bede2e0feb1e11c71e7787aab79bb..bc6fd39b58649dd8ea388b8c10396b4ab01111f1 100644
--- a/content/browser/media/midi_host.h
+++ b/content/browser/media/midi_host.h
@@ -24,7 +24,7 @@
#include "media/midi/midi_service.mojom.h"
namespace midi {
-class MidiManager;
+class MidiService;
class MidiMessageQueue;
} // namespace midi
@@ -34,7 +34,7 @@ class CONTENT_EXPORT MidiHost : public BrowserMessageFilter,
public midi::MidiManagerClient {
public:
// Called from UI thread from the owner of this object.
- MidiHost(int renderer_process_id, midi::MidiManager* midi_manager);
+ MidiHost(int renderer_process_id, midi::MidiService* midi_service);
// BrowserMessageFilter implementation.
void OnChannelClosing() override;
@@ -80,12 +80,9 @@ class CONTENT_EXPORT MidiHost : public BrowserMessageFilter,
// Represents if a session is requested to start.
bool is_session_requested_;
- // |midi_manager_| talks to the platform-specific MIDI APIs.
- // It can be NULL if the platform (or our current implementation)
- // does not support MIDI. If not supported then a call to
- // OnRequestAccess() will always refuse access and a call to
- // OnSendData() will do nothing.
- midi::MidiManager* midi_manager_;
+ // |midi_service_| manages a MidiManager instance that talks to
+ // platform-specific MIDI APIs. It can be nullptr after detached.
+ midi::MidiService* midi_service_;
// Buffers where data sent from each MIDI input port is stored.
ScopedVector<midi::MidiMessageQueue> received_messages_queues_;
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/media/midi_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698