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

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

Issue 552143003: MIDIAccess::create(): add missing adoptRefCountedGarbageCollected(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class MIDIOutputMap; 49 class MIDIOutputMap;
50 struct MIDIOptions; 50 struct MIDIOptions;
51 51
52 class MIDIAccess FINAL : public RefCountedGarbageCollectedWillBeGarbageCollected Finalized<MIDIAccess>, public ActiveDOMObject, public EventTargetWithInlineData, public MIDIAccessorClient { 52 class MIDIAccess FINAL : public RefCountedGarbageCollectedWillBeGarbageCollected Finalized<MIDIAccess>, public ActiveDOMObject, public EventTargetWithInlineData, public MIDIAccessorClient {
53 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<M IDIAccess>); 53 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<M IDIAccess>);
54 DEFINE_WRAPPERTYPEINFO(); 54 DEFINE_WRAPPERTYPEINFO();
55 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MIDIAccess); 55 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MIDIAccess);
56 public: 56 public:
57 static MIDIAccess* create(PassOwnPtr<MIDIAccessor> accessor, bool sysexEnabl ed, const Vector<MIDIAccessInitializer::PortDescriptor>& ports, ExecutionContext * executionContext) 57 static MIDIAccess* create(PassOwnPtr<MIDIAccessor> accessor, bool sysexEnabl ed, const Vector<MIDIAccessInitializer::PortDescriptor>& ports, ExecutionContext * executionContext)
58 { 58 {
59 MIDIAccess* access = new MIDIAccess(accessor, sysexEnabled, ports, execu tionContext); 59 MIDIAccess* access = adoptRefCountedGarbageCollectedWillBeNoop(new MIDIA ccess(accessor, sysexEnabled, ports, executionContext));
60 access->suspendIfNeeded(); 60 access->suspendIfNeeded();
61 return access; 61 return access;
62 } 62 }
63 virtual ~MIDIAccess(); 63 virtual ~MIDIAccess();
64 64
65 MIDIInputMap* inputs() const; 65 MIDIInputMap* inputs() const;
66 MIDIOutputMap* outputs() const; 66 MIDIOutputMap* outputs() const;
67 67
68 DEFINE_ATTRIBUTE_EVENT_LISTENER(connect); 68 DEFINE_ATTRIBUTE_EVENT_LISTENER(connect);
69 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect); 69 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect);
(...skipping 28 matching lines...) Expand all
98 98
99 OwnPtr<MIDIAccessor> m_accessor; 99 OwnPtr<MIDIAccessor> m_accessor;
100 bool m_sysexEnabled; 100 bool m_sysexEnabled;
101 HeapVector<Member<MIDIInput> > m_inputs; 101 HeapVector<Member<MIDIInput> > m_inputs;
102 HeapVector<Member<MIDIOutput> > m_outputs; 102 HeapVector<Member<MIDIOutput> > m_outputs;
103 }; 103 };
104 104
105 } // namespace blink 105 } // namespace blink
106 106
107 #endif // MIDIAccess_h 107 #endif // MIDIAccess_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698