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

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

Issue 18350002: Web MIDI: rename sysexEnabled to sysex (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 stop(); 53 stop();
54 } 54 }
55 55
56 MIDIAccess::MIDIAccess(ScriptExecutionContext* context, MIDIAccessPromise* promi se) 56 MIDIAccess::MIDIAccess(ScriptExecutionContext* context, MIDIAccessPromise* promi se)
57 : ActiveDOMObject(context) 57 : ActiveDOMObject(context)
58 , m_promise(promise) 58 , m_promise(promise)
59 , m_hasAccess(false) 59 , m_hasAccess(false)
60 { 60 {
61 ScriptWrappable::init(this); 61 ScriptWrappable::init(this);
62 m_accessor = MIDIAccessor::create(this); 62 m_accessor = MIDIAccessor::create(this);
63 m_accessor->requestAccess(promise->options()->sysexEnabled); 63 m_accessor->requestAccess(promise->options()->sysex);
64 } 64 }
65 65
66 void MIDIAccess::didAddInputPort(const String& id, const String& manufacturer, c onst String& name, const String& version) 66 void MIDIAccess::didAddInputPort(const String& id, const String& manufacturer, c onst String& name, const String& version)
67 { 67 {
68 ASSERT(isMainThread()); 68 ASSERT(isMainThread());
69 69
70 m_inputs.append(MIDIInput::create(scriptExecutionContext(), id, manufacturer , name, version)); 70 m_inputs.append(MIDIInput::create(scriptExecutionContext(), id, manufacturer , name, version));
71 } 71 }
72 72
73 void MIDIAccess::didAddOutputPort(const String& id, const String& manufacturer, const String& name, const String& version) 73 void MIDIAccess::didAddOutputPort(const String& id, const String& manufacturer, const String& name, const String& version)
(...skipping 27 matching lines...) Expand all
101 if (m_hasAccess && portIndex < m_inputs.size()) 101 if (m_hasAccess && portIndex < m_inputs.size())
102 m_inputs[portIndex]->didReceiveMIDIData(portIndex, data, length, timeSta mp); 102 m_inputs[portIndex]->didReceiveMIDIData(portIndex, data, length, timeSta mp);
103 } 103 }
104 104
105 void MIDIAccess::stop() 105 void MIDIAccess::stop()
106 { 106 {
107 m_hasAccess = false; 107 m_hasAccess = false;
108 } 108 }
109 109
110 } // namespace WebCore 110 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698