Chromium Code Reviews| 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 virtual ~MIDIAccess(); | 57 virtual ~MIDIAccess(); |
| 58 // Returns a promise object that will be resolved with this MIDIAccess. | 58 // Returns a promise object that will be resolved with this MIDIAccess. |
| 59 static ScriptPromise request(const MIDIOptions&, ExecutionContext*); | 59 static ScriptPromise request(const MIDIOptions&, ExecutionContext*); |
| 60 | 60 |
| 61 MIDIInputVector inputs() const { return m_inputs; } | 61 MIDIInputVector inputs() const { return m_inputs; } |
| 62 MIDIOutputVector outputs() const { return m_outputs; } | 62 MIDIOutputVector outputs() const { return m_outputs; } |
| 63 | 63 |
| 64 DEFINE_ATTRIBUTE_EVENT_LISTENER(connect); | 64 DEFINE_ATTRIBUTE_EVENT_LISTENER(connect); |
| 65 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect); | 65 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect); |
| 66 | 66 |
| 67 void setSysExEnabled(bool); | 67 void setSysexEnabled(bool); |
| 68 bool sysExEnabled() const { return m_sysExEnabled; } | 68 bool sysexEnabled() const { return m_sysexEnabled; } |
|
Takashi Toyoshima
2014/03/24 11:38:10
s/sysEx/sysex/ in MIDIAccess. I'm not sure we shou
tkent
2014/03/24 11:52:38
It's up to you.
I prefer renaming everything for c
| |
| 69 | 69 |
| 70 // EventTarget | 70 // EventTarget |
| 71 virtual const AtomicString& interfaceName() const OVERRIDE { return EventTar getNames::MIDIAccess; } | 71 virtual const AtomicString& interfaceName() const OVERRIDE { return EventTar getNames::MIDIAccess; } |
| 72 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD OMObject::executionContext(); } | 72 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD OMObject::executionContext(); } |
| 73 | 73 |
| 74 // ActiveDOMObject | 74 // ActiveDOMObject |
| 75 virtual void suspend() OVERRIDE; | 75 virtual void suspend() OVERRIDE; |
| 76 virtual void resume() OVERRIDE; | 76 virtual void resume() OVERRIDE; |
| 77 virtual void stop() OVERRIDE; | 77 virtual void stop() OVERRIDE; |
| 78 virtual bool hasPendingActivity() const OVERRIDE; | 78 virtual bool hasPendingActivity() const OVERRIDE; |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 108 // Called when the promise is resolved or rejected. | 108 // Called when the promise is resolved or rejected. |
| 109 void doPostAction(State); | 109 void doPostAction(State); |
| 110 | 110 |
| 111 State m_state; | 111 State m_state; |
| 112 WeakPtrFactory<MIDIAccess> m_weakPtrFactory; | 112 WeakPtrFactory<MIDIAccess> m_weakPtrFactory; |
| 113 MIDIInputVector m_inputs; | 113 MIDIInputVector m_inputs; |
| 114 MIDIOutputVector m_outputs; | 114 MIDIOutputVector m_outputs; |
| 115 OwnPtr<MIDIAccessor> m_accessor; | 115 OwnPtr<MIDIAccessor> m_accessor; |
| 116 OwnPtr<MIDIAccessResolver> m_resolver; | 116 OwnPtr<MIDIAccessResolver> m_resolver; |
| 117 MIDIOptions m_options; | 117 MIDIOptions m_options; |
| 118 bool m_sysExEnabled; | 118 bool m_sysexEnabled; |
| 119 AsyncMethodRunner<MIDIAccess> m_asyncResolveRunner; | 119 AsyncMethodRunner<MIDIAccess> m_asyncResolveRunner; |
| 120 AsyncMethodRunner<MIDIAccess> m_asyncRejectRunner; | 120 AsyncMethodRunner<MIDIAccess> m_asyncRejectRunner; |
| 121 RefPtrWillBeMember<DOMError> m_error; | 121 RefPtrWillBeMember<DOMError> m_error; |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 } // namespace WebCore | 124 } // namespace WebCore |
| 125 | 125 |
| 126 #endif // MIDIAccess_h | 126 #endif // MIDIAccess_h |
| OLD | NEW |