| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 { | 57 { |
| 58 MIDIAccess* access = new MIDIAccess(accessor, sysexEnabled, ports, execu
tionContext); | 58 MIDIAccess* access = new MIDIAccess(accessor, sysexEnabled, ports, execu
tionContext); |
| 59 access->suspendIfNeeded(); | 59 access->suspendIfNeeded(); |
| 60 return access; | 60 return access; |
| 61 } | 61 } |
| 62 virtual ~MIDIAccess(); | 62 virtual ~MIDIAccess(); |
| 63 | 63 |
| 64 MIDIInputMap* inputs() const; | 64 MIDIInputMap* inputs() const; |
| 65 MIDIOutputMap* outputs() const; | 65 MIDIOutputMap* outputs() const; |
| 66 | 66 |
| 67 DEFINE_ATTRIBUTE_EVENT_LISTENER(connect); | 67 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); |
| 68 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect); | |
| 69 | 68 |
| 70 bool sysexEnabled() const { return m_sysexEnabled; } | 69 bool sysexEnabled() const { return m_sysexEnabled; } |
| 71 | 70 |
| 72 // EventTarget | 71 // EventTarget |
| 73 virtual const AtomicString& interfaceName() const override { return EventTar
getNames::MIDIAccess; } | 72 virtual const AtomicString& interfaceName() const override { return EventTar
getNames::MIDIAccess; } |
| 74 virtual ExecutionContext* executionContext() const override { return ActiveD
OMObject::executionContext(); } | 73 virtual ExecutionContext* executionContext() const override { return ActiveD
OMObject::executionContext(); } |
| 75 | 74 |
| 76 // ActiveDOMObject | 75 // ActiveDOMObject |
| 77 virtual void stop() override; | 76 virtual void stop() override; |
| 78 | 77 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 99 | 98 |
| 100 OwnPtr<MIDIAccessor> m_accessor; | 99 OwnPtr<MIDIAccessor> m_accessor; |
| 101 bool m_sysexEnabled; | 100 bool m_sysexEnabled; |
| 102 HeapVector<Member<MIDIInput>> m_inputs; | 101 HeapVector<Member<MIDIInput>> m_inputs; |
| 103 HeapVector<Member<MIDIOutput>> m_outputs; | 102 HeapVector<Member<MIDIOutput>> m_outputs; |
| 104 }; | 103 }; |
| 105 | 104 |
| 106 } // namespace blink | 105 } // namespace blink |
| 107 | 106 |
| 108 #endif // MIDIAccess_h | 107 #endif // MIDIAccess_h |
| OLD | NEW |