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

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

Issue 2489033005: Web MIDI: deprecate MIDIMessageEvent.receivedTime (Closed)
Patch Set: [rebase] Created 4 years, 1 month 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 25 matching lines...) Expand all
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class MIDIMessageEventInit; 39 class MIDIMessageEventInit;
40 class ExecutionContext; 40 class ExecutionContext;
41 41
42 class MIDIMessageEvent final : public Event { 42 class MIDIMessageEvent final : public Event {
43 DEFINE_WRAPPERTYPEINFO(); 43 DEFINE_WRAPPERTYPEINFO();
44 44
45 public: 45 public:
46 static MIDIMessageEvent* create(double receivedTime, DOMUint8Array* data) { 46 static MIDIMessageEvent* create(double timeStamp, DOMUint8Array* data) {
47 return new MIDIMessageEvent(receivedTime, data); 47 return new MIDIMessageEvent(timeStamp, data);
48 } 48 }
49 49
50 static MIDIMessageEvent* create(ExecutionContext* context, 50 static MIDIMessageEvent* create(ExecutionContext* context,
51 const AtomicString& type, 51 const AtomicString& type,
52 const MIDIMessageEventInit& initializer) { 52 const MIDIMessageEventInit& initializer) {
53 return new MIDIMessageEvent(context, type, initializer); 53 return new MIDIMessageEvent(context, type, initializer);
54 } 54 }
55 55
56 double receivedTime() { return m_receivedTime; }
57 DOMUint8Array* data() { return m_data; } 56 DOMUint8Array* data() { return m_data; }
58 57
59 const AtomicString& interfaceName() const override { 58 const AtomicString& interfaceName() const override {
60 return EventNames::MIDIMessageEvent; 59 return EventNames::MIDIMessageEvent;
61 } 60 }
62 61
63 DEFINE_INLINE_VIRTUAL_TRACE() { 62 DEFINE_INLINE_VIRTUAL_TRACE() {
64 visitor->trace(m_data); 63 visitor->trace(m_data);
65 Event::trace(visitor); 64 Event::trace(visitor);
66 } 65 }
67 66
68 private: 67 private:
69 MIDIMessageEvent(double receivedTime, DOMUint8Array* data) 68 MIDIMessageEvent(double timeStamp, DOMUint8Array* data)
70 : Event(EventTypeNames::midimessage, true, false), 69 : Event(EventTypeNames::midimessage, true, false, timeStamp),
71 m_receivedTime(receivedTime),
72 m_data(data) {} 70 m_data(data) {}
73 71
74 MIDIMessageEvent(ExecutionContext*, 72 MIDIMessageEvent(ExecutionContext*,
75 const AtomicString& type, 73 const AtomicString& type,
76 const MIDIMessageEventInit& initializer); 74 const MIDIMessageEventInit& initializer);
77 75
78 double m_receivedTime;
79 Member<DOMUint8Array> m_data; 76 Member<DOMUint8Array> m_data;
80 }; 77 };
81 78
82 } // namespace blink 79 } // namespace blink
83 80
84 #endif // MIDIMessageEvent_h 81 #endif // MIDIMessageEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698