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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 String name() const { return m_name; } | 55 String name() const { return m_name; } |
56 String type() const; | 56 String type() const; |
57 String version() const { return m_version; } | 57 String version() const { return m_version; } |
58 | 58 |
59 using RefCounted<MIDIPort>::ref; | 59 using RefCounted<MIDIPort>::ref; |
60 using RefCounted<MIDIPort>::deref; | 60 using RefCounted<MIDIPort>::deref; |
61 | 61 |
62 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect); | 62 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect); |
63 | 63 |
64 // EventTarget | 64 // EventTarget |
65 virtual const AtomicString& interfaceName() const OVERRIDE { return eventNam
es().interfaceForMIDIPort; } | 65 virtual const AtomicString& interfaceName() const OVERRIDE { return EventTar
getNames::MIDIPort; } |
66 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD
OMObject::executionContext(); } | 66 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD
OMObject::executionContext(); } |
67 | 67 |
68 // ActiveDOMObject | 68 // ActiveDOMObject |
69 virtual bool canSuspend() const OVERRIDE { return true; } | 69 virtual bool canSuspend() const OVERRIDE { return true; } |
70 | 70 |
71 protected: | 71 protected: |
72 MIDIPort(ExecutionContext*, const String& id, const String& manufacturer, co
nst String& name, MIDIPortTypeCode, const String& version); | 72 MIDIPort(ExecutionContext*, const String& id, const String& manufacturer, co
nst String& name, MIDIPortTypeCode, const String& version); |
73 | 73 |
74 private: | 74 private: |
75 // EventTarget | 75 // EventTarget |
76 virtual void refEventTarget() OVERRIDE { ref(); } | 76 virtual void refEventTarget() OVERRIDE { ref(); } |
77 virtual void derefEventTarget() OVERRIDE { deref(); } | 77 virtual void derefEventTarget() OVERRIDE { deref(); } |
78 | 78 |
79 String m_id; | 79 String m_id; |
80 String m_manufacturer; | 80 String m_manufacturer; |
81 String m_name; | 81 String m_name; |
82 MIDIPortTypeCode m_type; | 82 MIDIPortTypeCode m_type; |
83 String m_version; | 83 String m_version; |
84 }; | 84 }; |
85 | 85 |
86 typedef Vector<RefPtr<MIDIPort> > MIDIPortVector; | 86 typedef Vector<RefPtr<MIDIPort> > MIDIPortVector; |
87 | 87 |
88 } // namespace WebCore | 88 } // namespace WebCore |
89 | 89 |
90 #endif // MIDIPort_h | 90 #endif // MIDIPort_h |
OLD | NEW |