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

Side by Side Diff: Source/modules/webmidi/MIDIAccessInitializer.h

Issue 864943003: Dispose of MIDIAccessInitializer on contextDestroyed() notification. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/modules/webmidi/MIDIAccessInitializer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MIDIAccessInitializer_h 5 #ifndef MIDIAccessInitializer_h
6 #define MIDIAccessInitializer_h 6 #define MIDIAccessInitializer_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "modules/webmidi/MIDIAccessor.h" 10 #include "modules/webmidi/MIDIAccessor.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void resolveSysexPermission(bool allowed); 59 void resolveSysexPermission(bool allowed);
60 SecurityOrigin* securityOrigin() const; 60 SecurityOrigin* securityOrigin() const;
61 61
62 private: 62 private:
63 MIDIAccessInitializer(ScriptState*, const MIDIOptions&); 63 MIDIAccessInitializer(ScriptState*, const MIDIOptions&);
64 64
65 ExecutionContext* executionContext() const; 65 ExecutionContext* executionContext() const;
66 ScriptPromise start(); 66 ScriptPromise start();
67 void dispose(); 67 void dispose();
68 68
69 virtual void contextDestroyed() override;
70
69 OwnPtr<MIDIAccessor> m_accessor; 71 OwnPtr<MIDIAccessor> m_accessor;
70 Vector<PortDescriptor> m_portDescriptors; 72 Vector<PortDescriptor> m_portDescriptors;
71 bool m_requestSysex; 73 bool m_requestSysex;
74 bool m_hasBeenDisposed;
72 }; 75 };
73 76
74 } // namespace blink 77 } // namespace blink
75 78
76 #endif // MIDIAccessInitializer_h 79 #endif // MIDIAccessInitializer_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/webmidi/MIDIAccessInitializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698