| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |