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

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

Issue 1043863002: Web MIDI: final IDL updates to conform the latest WD for shipping (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: TODO: ActiveDOMObject Created 5 years, 8 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 | Annotate | Revision Log
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 using PortState = MIDIAccessor::MIDIPortState; 49 using PortState = MIDIAccessor::MIDIPortState;
50 50
51 MIDIAccess::MIDIAccess(PassOwnPtr<MIDIAccessor> accessor, bool sysexEnabled, con st Vector<MIDIAccessInitializer::PortDescriptor>& ports, ExecutionContext* execu tionContext) 51 MIDIAccess::MIDIAccess(PassOwnPtr<MIDIAccessor> accessor, bool sysexEnabled, con st Vector<MIDIAccessInitializer::PortDescriptor>& ports, ExecutionContext* execu tionContext)
52 : ActiveDOMObject(executionContext) 52 : ActiveDOMObject(executionContext)
53 , m_accessor(accessor) 53 , m_accessor(accessor)
54 , m_sysexEnabled(sysexEnabled) 54 , m_sysexEnabled(sysexEnabled)
55 { 55 {
56 m_accessor->setClient(this); 56 m_accessor->setClient(this);
57 for (size_t i = 0; i < ports.size(); ++i) { 57 for (size_t i = 0; i < ports.size(); ++i) {
58 const MIDIAccessInitializer::PortDescriptor& port = ports[i]; 58 const MIDIAccessInitializer::PortDescriptor& port = ports[i];
59 if (port.type == MIDIPort::MIDIPortTypeInput) { 59 if (port.type == MIDIPort::TypeInput) {
60 m_inputs.append(MIDIInput::create(this, port.id, port.manufacturer, port.name, port.version, port.state)); 60 m_inputs.append(MIDIInput::create(this, port.id, port.manufacturer, port.name, port.version, port.state));
61 } else { 61 } else {
62 m_outputs.append(MIDIOutput::create(this, m_outputs.size(), port.id, port.manufacturer, port.name, port.version, port.state)); 62 m_outputs.append(MIDIOutput::create(this, m_outputs.size(), port.id, port.manufacturer, port.name, port.version, port.state));
63 } 63 }
64 } 64 }
65 } 65 }
66 66
67 MIDIAccess::~MIDIAccess() 67 MIDIAccess::~MIDIAccess()
68 { 68 {
69 } 69 }
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 DEFINE_TRACE(MIDIAccess) 188 DEFINE_TRACE(MIDIAccess)
189 { 189 {
190 visitor->trace(m_inputs); 190 visitor->trace(m_inputs);
191 visitor->trace(m_outputs); 191 visitor->trace(m_outputs);
192 RefCountedGarbageCollectedEventTargetWithInlineData<MIDIAccess>::trace(visit or); 192 RefCountedGarbageCollectedEventTargetWithInlineData<MIDIAccess>::trace(visit or);
193 ActiveDOMObject::trace(visitor); 193 ActiveDOMObject::trace(visitor);
194 } 194 }
195 195
196 } // namespace blink 196 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/webmidi/open_close-expected.txt ('k') | Source/modules/webmidi/MIDIAccessInitializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698