Index: content/browser/media/midi_host.h |
diff --git a/content/browser/media/midi_host.h b/content/browser/media/midi_host.h |
index ef5f904b5de7d50178e4de095d71b78c6e3aca38..714444c9d7dfa3b20ddf48a3d71e107b5d0d3417 100644 |
--- a/content/browser/media/midi_host.h |
+++ b/content/browser/media/midi_host.h |
@@ -11,6 +11,7 @@ |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/memory/scoped_vector.h" |
+#include "base/synchronization/lock.h" |
#include "content/common/content_export.h" |
#include "content/public/browser/browser_message_filter.h" |
#include "content/public/browser/browser_thread.h" |
@@ -35,8 +36,7 @@ class CONTENT_EXPORT MidiHost |
virtual bool OnMessageReceived(const IPC::Message& message) override; |
// MidiManagerClient implementation. |
- virtual void CompleteStartSession(int client_id, |
- media::MidiResult result) override; |
+ virtual void CompleteStartSession(media::MidiResult result) override; |
virtual void ReceiveMidiData(uint32 port, |
const uint8* data, |
size_t length, |
@@ -44,13 +44,15 @@ class CONTENT_EXPORT MidiHost |
virtual void AccumulateMidiBytesSent(size_t n) override; |
// Start session to access MIDI hardware. |
- void OnStartSession(int client_id); |
+ void OnStartSession(); |
// Data to be sent to a MIDI output port. |
void OnSendData(uint32 port, |
const std::vector<uint8>& data, |
double timestamp); |
+ void OnEndSession(); |
+ |
private: |
FRIEND_TEST_ALL_PREFIXES(MidiHostTest, IsValidWebMIDIData); |
friend class base::DeleteHelper<MidiHost>; |
@@ -71,6 +73,9 @@ class CONTENT_EXPORT MidiHost |
// messages. |
bool has_sys_ex_permission_; |
+ // 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 |