| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 MIDIAccessor::MIDIPortState getState() const { return m_state; } | 75 MIDIAccessor::MIDIPortState getState() const { return m_state; } |
| 76 void setState(MIDIAccessor::MIDIPortState); | 76 void setState(MIDIAccessor::MIDIPortState); |
| 77 ConnectionState getConnection() const { return m_connection; } | 77 ConnectionState getConnection() const { return m_connection; } |
| 78 | 78 |
| 79 DECLARE_VIRTUAL_TRACE(); | 79 DECLARE_VIRTUAL_TRACE(); |
| 80 | 80 |
| 81 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); | 81 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); |
| 82 | 82 |
| 83 // EventTarget | 83 // EventTarget |
| 84 const AtomicString& interfaceName() const override { return EventTargetNames
::MIDIPort; } | 84 const AtomicString& interfaceName() const override { return EventTargetNames
::MIDIPort; } |
| 85 ExecutionContext* executionContext() const final; | 85 ExecutionContext* getExecutionContext() const final; |
| 86 | 86 |
| 87 // ActiveDOMObject | 87 // ActiveDOMObject |
| 88 bool hasPendingActivity() const override; | 88 bool hasPendingActivity() const override; |
| 89 void stop() override; | 89 void stop() override; |
| 90 | 90 |
| 91 protected: | 91 protected: |
| 92 MIDIPort(MIDIAccess*, const String& id, const String& manufacturer, const St
ring& name, TypeCode, const String& version, MIDIAccessor::MIDIPortState); | 92 MIDIPort(MIDIAccess*, const String& id, const String& manufacturer, const St
ring& name, TypeCode, const String& version, MIDIAccessor::MIDIPortState); |
| 93 | 93 |
| 94 void open(); | 94 void open(); |
| 95 | 95 |
| 96 private: | 96 private: |
| 97 ScriptPromise accept(ScriptState*); | 97 ScriptPromise accept(ScriptState*); |
| 98 ScriptPromise reject(ScriptState*, ExceptionCode, const String& message); | 98 ScriptPromise reject(ScriptState*, ExceptionCode, const String& message); |
| 99 | 99 |
| 100 void setStates(MIDIAccessor::MIDIPortState, ConnectionState); | 100 void setStates(MIDIAccessor::MIDIPortState, ConnectionState); |
| 101 | 101 |
| 102 String m_id; | 102 String m_id; |
| 103 String m_manufacturer; | 103 String m_manufacturer; |
| 104 String m_name; | 104 String m_name; |
| 105 TypeCode m_type; | 105 TypeCode m_type; |
| 106 String m_version; | 106 String m_version; |
| 107 Member<MIDIAccess> m_access; | 107 Member<MIDIAccess> m_access; |
| 108 MIDIAccessor::MIDIPortState m_state; | 108 MIDIAccessor::MIDIPortState m_state; |
| 109 ConnectionState m_connection; | 109 ConnectionState m_connection; |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 } // namespace blink | 112 } // namespace blink |
| 113 | 113 |
| 114 #endif // MIDIPort_h | 114 #endif // MIDIPort_h |
| OLD | NEW |