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

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

Issue 783423003: Make ScriptPromiseResolver RefCountedWillBeRefCountedGarbageCollected. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: WIP: 1st trial Created 6 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 unified diff | Download patch
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 21 matching lines...) Expand all
32 : id(id) 32 : id(id)
33 , manufacturer(manufacturer) 33 , manufacturer(manufacturer)
34 , name(name) 34 , name(name)
35 , type(type) 35 , type(type)
36 , version(version) 36 , version(version)
37 , isActive(isActive) { } 37 , isActive(isActive) { }
38 }; 38 };
39 39
40 static ScriptPromise start(ScriptState* scriptState, const MIDIOptions& opti ons) 40 static ScriptPromise start(ScriptState* scriptState, const MIDIOptions& opti ons)
41 { 41 {
42 RefPtr<MIDIAccessInitializer> p = adoptRef(new MIDIAccessInitializer(scr iptState, options)); 42 RefPtrWillBeRawPtr<MIDIAccessInitializer> p = adoptRefWillBeNoop(new MID IAccessInitializer(scriptState, options));
43 p->keepAliveWhilePending(); 43 p->keepAliveWhilePending();
44 p->suspendIfNeeded(); 44 p->suspendIfNeeded();
45 return p->start(); 45 return p->start();
46 } 46 }
47 47
48 virtual ~MIDIAccessInitializer(); 48 virtual ~MIDIAccessInitializer();
49 49
50 // MIDIAccessorClient 50 // MIDIAccessorClient
51 virtual void didAddInputPort(const String& id, const String& manufacturer, c onst String& name, const String& version, bool isActive) override; 51 virtual void didAddInputPort(const String& id, const String& manufacturer, c onst String& name, const String& version, bool isActive) override;
52 virtual void didAddOutputPort(const String& id, const String& manufacturer, const String& name, const String& version, bool isActive) override; 52 virtual void didAddOutputPort(const String& id, const String& manufacturer, const String& name, const String& version, bool isActive) override;
(...skipping 14 matching lines...) Expand all
67 67
68 OwnPtr<MIDIAccessor> m_accessor; 68 OwnPtr<MIDIAccessor> m_accessor;
69 bool m_requestSysex; 69 bool m_requestSysex;
70 Vector<PortDescriptor> m_portDescriptors; 70 Vector<PortDescriptor> m_portDescriptors;
71 }; 71 };
72 72
73 } // namespace blink 73 } // namespace blink
74 74
75 75
76 #endif // MIDIAccessInitializer_h 76 #endif // MIDIAccessInitializer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698