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

Side by Side Diff: Source/core/html/track/TrackEvent.h

Issue 690923004: TrackEvent.track should be (VideoTrack or AudioTrack or TextTrack)? (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 13 matching lines...) Expand all
24 */ 24 */
25 25
26 #ifndef TrackEvent_h 26 #ifndef TrackEvent_h
27 #define TrackEvent_h 27 #define TrackEvent_h
28 28
29 #include "core/events/Event.h" 29 #include "core/events/Event.h"
30 #include "core/html/track/TrackBase.h" 30 #include "core/html/track/TrackBase.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 class VideoTrackOrAudioTrackOrTextTrack;
35
34 struct TrackEventInit : public EventInit { 36 struct TrackEventInit : public EventInit {
35 TrackEventInit(); 37 TrackEventInit();
36 38
37 RefPtrWillBeMember<TrackBase> track; 39 RefPtrWillBeMember<TrackBase> track;
38 }; 40 };
39 41
40 class TrackEvent final : public Event { 42 class TrackEvent final : public Event {
41 DEFINE_WRAPPERTYPEINFO(); 43 DEFINE_WRAPPERTYPEINFO();
42 public: 44 public:
43 virtual ~TrackEvent(); 45 virtual ~TrackEvent();
44 46
45 static PassRefPtrWillBeRawPtr<TrackEvent> create() 47 static PassRefPtrWillBeRawPtr<TrackEvent> create()
46 { 48 {
47 return adoptRefWillBeNoop(new TrackEvent); 49 return adoptRefWillBeNoop(new TrackEvent);
48 } 50 }
49 51
50 static PassRefPtrWillBeRawPtr<TrackEvent> create(const AtomicString& type, c onst TrackEventInit& initializer) 52 static PassRefPtrWillBeRawPtr<TrackEvent> create(const AtomicString& type, c onst TrackEventInit& initializer)
51 { 53 {
52 return adoptRefWillBeNoop(new TrackEvent(type, initializer)); 54 return adoptRefWillBeNoop(new TrackEvent(type, initializer));
53 } 55 }
54 56
55 virtual const AtomicString& interfaceName() const override; 57 virtual const AtomicString& interfaceName() const override;
56 58
57 TrackBase* track() const { return m_track.get(); } 59 void track(VideoTrackOrAudioTrackOrTextTrack&);
58 60
59 virtual void trace(Visitor*) override; 61 virtual void trace(Visitor*) override;
60 62
61 private: 63 private:
62 TrackEvent(); 64 TrackEvent();
63 TrackEvent(const AtomicString& type, const TrackEventInit& initializer); 65 TrackEvent(const AtomicString& type, const TrackEventInit& initializer);
64 66
65 RefPtrWillBeMember<TrackBase> m_track; 67 RefPtrWillBeMember<TrackBase> m_track;
66 }; 68 };
67 69
68 } // namespace blink 70 } // namespace blink
69 71
70 #endif // TrackEvent_h 72 #endif // TrackEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698