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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
50 | 50 |
51 virtual ~MIDIPort() { } | 51 virtual ~MIDIPort() { } |
52 | 52 |
53 String id() const { return m_id; } | 53 String id() const { return m_id; } |
54 String manufacturer() const { return m_manufacturer; } | 54 String manufacturer() const { return m_manufacturer; } |
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 MIDIAccess* midiAccess() const { return m_access; } | 59 MIDIAccess* midiAccess() const { return m_access; } |
60 bool isActive() const { return m_active; } | |
61 void setActiveState(bool active) { m_active = active; } | |
60 | 62 |
61 virtual void trace(Visitor*) override; | 63 virtual void trace(Visitor*) override; |
62 | 64 |
63 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect); | 65 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect); |
64 | 66 |
65 // EventTarget | 67 // EventTarget |
66 virtual const AtomicString& interfaceName() const override { return EventTar getNames::MIDIPort; } | 68 virtual const AtomicString& interfaceName() const override { return EventTar getNames::MIDIPort; } |
67 virtual ExecutionContext* executionContext() const override final; | 69 virtual ExecutionContext* executionContext() const override final; |
68 | 70 |
69 protected: | 71 protected: |
70 MIDIPort(MIDIAccess*, const String& id, const String& manufacturer, const St ring& name, MIDIPortTypeCode, const String& version); | 72 MIDIPort(MIDIAccess*, const String& id, const String& manufacturer, const St ring& name, MIDIPortTypeCode, const String& version, bool active); |
71 | 73 |
72 private: | 74 private: |
73 String m_id; | 75 String m_id; |
74 String m_manufacturer; | 76 String m_manufacturer; |
75 String m_name; | 77 String m_name; |
76 MIDIPortTypeCode m_type; | 78 MIDIPortTypeCode m_type; |
77 String m_version; | 79 String m_version; |
78 Member<MIDIAccess> m_access; | 80 Member<MIDIAccess> m_access; |
81 bool m_active; | |
tkent
2014/10/20 05:54:07
should be |m_isActive|
Takashi Toyoshima
2014/10/20 06:24:18
Done.
| |
79 }; | 82 }; |
80 | 83 |
81 } // namespace blink | 84 } // namespace blink |
82 | 85 |
83 #endif // MIDIPort_h | 86 #endif // MIDIPort_h |
OLD | NEW |