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

Side by Side Diff: third_party/WebKit/Source/modules/webmidi/MIDIInput.cpp

Issue 2392463004: reflow comments in modules/{webmidi,websocket} (Closed)
Patch Set: Created 4 years, 2 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
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 size_t length, 86 size_t length,
87 double timeStamp) { 87 double timeStamp) {
88 DCHECK(isMainThread()); 88 DCHECK(isMainThread());
89 89
90 if (!length) 90 if (!length)
91 return; 91 return;
92 92
93 if (getConnection() != ConnectionStateOpen) 93 if (getConnection() != ConnectionStateOpen)
94 return; 94 return;
95 95
96 // Drop sysex message here when the client does not request it. Note that this is not a security check but an 96 // Drop sysex message here when the client does not request it. Note that this
97 // automatic filtering for clients that do not want sysex message. Also note t hat sysex message will never be sent 97 // is not a security check but an automatic filtering for clients that do not
98 // unless the current process has an explicit permission to handle sysex messa ge. 98 // want sysex message. Also note that sysex message will never be sent unless
99 // the current process has an explicit permission to handle sysex message.
99 if (data[0] == 0xf0 && !midiAccess()->sysexEnabled()) 100 if (data[0] == 0xf0 && !midiAccess()->sysexEnabled())
100 return; 101 return;
101 DOMUint8Array* array = DOMUint8Array::create(data, length); 102 DOMUint8Array* array = DOMUint8Array::create(data, length);
102 dispatchEvent(MIDIMessageEvent::create(timeStamp, array)); 103 dispatchEvent(MIDIMessageEvent::create(timeStamp, array));
103 } 104 }
104 105
105 DEFINE_TRACE(MIDIInput) { 106 DEFINE_TRACE(MIDIInput) {
106 MIDIPort::trace(visitor); 107 MIDIPort::trace(visitor);
107 } 108 }
108 109
109 } // namespace blink 110 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webmidi/MIDIInput.h ('k') | third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698