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

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

Issue 2542693002: Use WTF::TimeTicks to represent timestamp in Platform/Core event types (Closed)
Patch Set: rebase Created 4 years 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 return EventNames::MIDIMessageEvent; 57 return EventNames::MIDIMessageEvent;
58 } 58 }
59 59
60 DEFINE_INLINE_VIRTUAL_TRACE() { 60 DEFINE_INLINE_VIRTUAL_TRACE() {
61 visitor->trace(m_data); 61 visitor->trace(m_data);
62 Event::trace(visitor); 62 Event::trace(visitor);
63 } 63 }
64 64
65 private: 65 private:
66 MIDIMessageEvent(double timeStamp, DOMUint8Array* data) 66 MIDIMessageEvent(double timeStamp, DOMUint8Array* data)
67 : Event(EventTypeNames::midimessage, true, false, timeStamp), 67 : Event(EventTypeNames::midimessage,
68 true,
69 false,
70 TimeTicks() + TimeDelta::FromSecondsD(timeStamp)),
68 m_data(data) {} 71 m_data(data) {}
69 72
70 MIDIMessageEvent(const AtomicString& type, 73 MIDIMessageEvent(const AtomicString& type,
71 const MIDIMessageEventInit& initializer); 74 const MIDIMessageEventInit& initializer);
72 75
73 Member<DOMUint8Array> m_data; 76 Member<DOMUint8Array> m_data;
74 }; 77 };
75 78
76 } // namespace blink 79 } // namespace blink
77 80
78 #endif // MIDIMessageEvent_h 81 #endif // MIDIMessageEvent_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/DragController.cpp ('k') | third_party/WebKit/Source/platform/PlatformEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698