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

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

Issue 1901103006: Web MIDI: Replace ASSERT macros with DCHECK macros (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webmidi/MIDIAccess.cpp » ('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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 // MIDIAccessorClient 83 // MIDIAccessorClient
84 void didAddInputPort(const String& id, const String& manufacturer, const Str ing& name, const String& version, MIDIAccessor::MIDIPortState) override; 84 void didAddInputPort(const String& id, const String& manufacturer, const Str ing& name, const String& version, MIDIAccessor::MIDIPortState) override;
85 void didAddOutputPort(const String& id, const String& manufacturer, const St ring& name, const String& version, MIDIAccessor::MIDIPortState) override; 85 void didAddOutputPort(const String& id, const String& manufacturer, const St ring& name, const String& version, MIDIAccessor::MIDIPortState) override;
86 void didSetInputPortState(unsigned portIndex, MIDIAccessor::MIDIPortState) o verride; 86 void didSetInputPortState(unsigned portIndex, MIDIAccessor::MIDIPortState) o verride;
87 void didSetOutputPortState(unsigned portIndex, MIDIAccessor::MIDIPortState) override; 87 void didSetOutputPortState(unsigned portIndex, MIDIAccessor::MIDIPortState) override;
88 void didStartSession(bool success, const String& error, const String& messag e) override 88 void didStartSession(bool success, const String& error, const String& messag e) override
89 { 89 {
90 // This method is for MIDIAccess initialization: MIDIAccessInitializer 90 // This method is for MIDIAccess initialization: MIDIAccessInitializer
91 // has the implementation. 91 // has the implementation.
92 ASSERT_NOT_REACHED(); 92 NOTREACHED();
93 } 93 }
94 void didReceiveMIDIData(unsigned portIndex, const unsigned char* data, size_ t length, double timeStamp) override; 94 void didReceiveMIDIData(unsigned portIndex, const unsigned char* data, size_ t length, double timeStamp) override;
95 95
96 // |timeStampInMilliseconds| is in the same time coordinate system as perfor mance.now(). 96 // |timeStampInMilliseconds| is in the same time coordinate system as perfor mance.now().
97 void sendMIDIData(unsigned portIndex, const unsigned char* data, size_t leng th, double timeStampInMilliseconds); 97 void sendMIDIData(unsigned portIndex, const unsigned char* data, size_t leng th, double timeStampInMilliseconds);
98 98
99 // Eager finalization needed to promptly release m_accessor. Otherwise 99 // Eager finalization needed to promptly release m_accessor. Otherwise
100 // its client back reference could end up being unsafely used during 100 // its client back reference could end up being unsafely used during
101 // the lazy sweeping phase. 101 // the lazy sweeping phase.
102 DECLARE_VIRTUAL_TRACE(); 102 DECLARE_VIRTUAL_TRACE();
103 103
104 private: 104 private:
105 MIDIAccess(PassOwnPtr<MIDIAccessor>, bool sysexEnabled, const Vector<MIDIAcc essInitializer::PortDescriptor>&, ExecutionContext*); 105 MIDIAccess(PassOwnPtr<MIDIAccessor>, bool sysexEnabled, const Vector<MIDIAcc essInitializer::PortDescriptor>&, ExecutionContext*);
106 void dispose(); 106 void dispose();
107 107
108 OwnPtr<MIDIAccessor> m_accessor; 108 OwnPtr<MIDIAccessor> m_accessor;
109 bool m_sysexEnabled; 109 bool m_sysexEnabled;
110 bool m_hasPendingActivity; 110 bool m_hasPendingActivity;
111 HeapVector<Member<MIDIInput>> m_inputs; 111 HeapVector<Member<MIDIInput>> m_inputs;
112 HeapVector<Member<MIDIOutput>> m_outputs; 112 HeapVector<Member<MIDIOutput>> m_outputs;
113 }; 113 };
114 114
115 } // namespace blink 115 } // namespace blink
116 116
117 #endif // MIDIAccess_h 117 #endif // MIDIAccess_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webmidi/MIDIAccess.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698