Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Side by Side Diff: Source/modules/webmidi/MIDIAccess.h

Issue 518633003: [ABANDONED] [WebMIDI] Support the legacy MIDIAccess port API. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@webmidi-input-map
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/bindings/modules/v8/custom/custom.gypi ('k') | Source/modules/webmidi/MIDIAccess.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 static MIDIAccess* create(PassOwnPtr<MIDIAccessor> accessor, bool sysexEnabl ed, const Vector<MIDIAccessInitializer::PortDescriptor>& ports, ExecutionContext * executionContext) 56 static MIDIAccess* create(PassOwnPtr<MIDIAccessor> accessor, bool sysexEnabl ed, const Vector<MIDIAccessInitializer::PortDescriptor>& ports, ExecutionContext * executionContext)
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 const HeapVector<Member<MIDIInput> >& inputsAsVector() const { return m_inpu ts; }
67 const HeapVector<Member<MIDIOutput> >& outputsAsVector() const { return m_ou tputs; }
66 68
67 DEFINE_ATTRIBUTE_EVENT_LISTENER(connect); 69 DEFINE_ATTRIBUTE_EVENT_LISTENER(connect);
68 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect); 70 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect);
69 71
70 bool sysexEnabled() const { return m_sysexEnabled; } 72 bool sysexEnabled() const { return m_sysexEnabled; }
71 73
72 // EventTarget 74 // EventTarget
73 virtual const AtomicString& interfaceName() const OVERRIDE { return EventTar getNames::MIDIAccess; } 75 virtual const AtomicString& interfaceName() const OVERRIDE { return EventTar getNames::MIDIAccess; }
74 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD OMObject::executionContext(); } 76 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD OMObject::executionContext(); }
75 77
(...skipping 21 matching lines...) Expand all
97 99
98 OwnPtr<MIDIAccessor> m_accessor; 100 OwnPtr<MIDIAccessor> m_accessor;
99 bool m_sysexEnabled; 101 bool m_sysexEnabled;
100 HeapVector<Member<MIDIInput> > m_inputs; 102 HeapVector<Member<MIDIInput> > m_inputs;
101 HeapVector<Member<MIDIOutput> > m_outputs; 103 HeapVector<Member<MIDIOutput> > m_outputs;
102 }; 104 };
103 105
104 } // namespace blink 106 } // namespace blink
105 107
106 #endif // MIDIAccess_h 108 #endif // MIDIAccess_h
OLDNEW
« no previous file with comments | « Source/bindings/modules/v8/custom/custom.gypi ('k') | Source/modules/webmidi/MIDIAccess.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698