Index: media/midi/midi_manager.h |
diff --git a/media/midi/midi_manager.h b/media/midi/midi_manager.h |
index 957c84d427f0dc85b291cd6b9cee188067dca5d7..8f51f133aa9e3fe3e879cff8a1e26c6a47049164 100644 |
--- a/media/midi/midi_manager.h |
+++ b/media/midi/midi_manager.h |
@@ -75,6 +75,10 @@ class MIDI_EXPORT MidiManager { |
// thread. |
static MidiManager* Create(); |
+ // Called on the CrBrowserMain thread to notify the Chrome_IOThread will stop |
+ // and the instance will be destructed on the CrBrowserMain thread soon. |
+ void Shutdown(); |
+ |
// A client calls StartSession() to receive and send MIDI data. |
// If the session is ready to start, the MIDI system is lazily initialized |
// and the client is registered to receive MIDI data. |
@@ -119,6 +123,12 @@ class MIDI_EXPORT MidiManager { |
// |result| should be Result::OK on success, otherwise a proper Result. |
virtual void StartInitialization(); |
+ // Finalizes the platform dependent MIDI system. Called on Chrome_IOThread |
+ // thread and the thread will stop immediately after this call. |
+ // Platform dependent resources that were allocated on the Chrome_IOThread |
+ // should be disposed inside this method. |
+ virtual void Finalize() {} |
+ |
// Called from a platform dependent implementation of StartInitialization(). |
// It invokes CompleteInitializationInternal() on the thread that calls |
// StartSession() and distributes |result| to MIDIManagerClient objects in |
@@ -169,6 +179,9 @@ class MIDI_EXPORT MidiManager { |
// Keeps true if platform dependent initialization is already completed. |
bool initialized_; |
+ // Keeps false until Shutdown() is called. |
+ bool shutted_down_; |
yhirano
2015/09/07 06:00:25
"shut"'s past participle form is "shut", not "shut
Takashi Toyoshima
2015/09/07 19:04:39
Done.
|
+ |
// Keeps the platform dependent initialization result if initialization is |
// completed. Otherwise keeps Result::NOT_INITIALIZED. |
Result result_; |