Index: content/browser/media/midi_host.h |
diff --git a/content/browser/media/midi_host.h b/content/browser/media/midi_host.h |
index 671bd3c6543ccf40b4e1a1b3e1d46b1cdb76f8ea..e0f60f3a7f16e2bff61f67f9740c3245df61ef34 100644 |
--- a/content/browser/media/midi_host.h |
+++ b/content/browser/media/midi_host.h |
@@ -38,8 +38,10 @@ class CONTENT_EXPORT MidiHost : public BrowserMessageFilter, |
MidiHost(int renderer_process_id, media::midi::MidiManager* midi_manager); |
// BrowserMessageFilter implementation. |
+ void OnChannelClosing() override; |
void OnDestruct() const override; |
bool OnMessageReceived(const IPC::Message& message) override; |
+ bool Send(IPC::Message* msg) override; |
// MidiManagerClient implementation. |
void CompleteStartSession(media::midi::Result result) override; |
@@ -120,6 +122,12 @@ class CONTENT_EXPORT MidiHost : public BrowserMessageFilter, |
// Protects access to |output_port_count_|. |
base::Lock output_port_count_lock_; |
+ // Represents whether if the IPC channel is about to close. |
+ bool is_channel_closing_; |
+ |
+ // Protects access to |is_channel_closing_|. |
+ base::Lock is_channel_closing_lock_; |
+ |
DISALLOW_COPY_AND_ASSIGN(MidiHost); |
}; |