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

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

Issue 790973002: Use event init dictionary in core/html/track (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@union-includes
Patch Set: Created 6 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
« no previous file with comments | « Source/core/html/track/TrackEvent.h ('k') | Source/core/html/track/TrackEvent.idl » ('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) 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 15 matching lines...) Expand all
26 #include "config.h" 26 #include "config.h"
27 #include "core/html/track/TrackEvent.h" 27 #include "core/html/track/TrackEvent.h"
28 28
29 #include "bindings/core/v8/UnionTypesCore.h" 29 #include "bindings/core/v8/UnionTypesCore.h"
30 #include "core/html/track/AudioTrack.h" 30 #include "core/html/track/AudioTrack.h"
31 #include "core/html/track/TextTrack.h" 31 #include "core/html/track/TextTrack.h"
32 #include "core/html/track/VideoTrack.h" 32 #include "core/html/track/VideoTrack.h"
33 33
34 namespace blink { 34 namespace blink {
35 35
36 TrackEventInit::TrackEventInit()
37 {
38 }
39
40
41 TrackEvent::TrackEvent() 36 TrackEvent::TrackEvent()
42 { 37 {
43 } 38 }
44 39
45 TrackEvent::TrackEvent(const AtomicString& type, const TrackEventInit& initializ er) 40 TrackEvent::TrackEvent(const AtomicString& type, const TrackEventInit& initializ er)
46 : Event(type, initializer) 41 : Event(type, initializer)
47 , m_track(initializer.track)
48 { 42 {
43 const VideoTrackOrAudioTrackOrTextTrack& track = initializer.track();
44 if (track.isVideoTrack())
45 m_track = track.getAsVideoTrack();
46 if (track.isAudioTrack())
philipj_slow 2014/12/10 08:22:48 I'm guessing the compiler can't figure out that th
bashi 2014/12/10 08:45:56 Done. The compiler checks the type of the given va
47 m_track = track.getAsAudioTrack();
48 if (track.isTextTrack())
49 m_track = track.getAsTextTrack();
49 } 50 }
50 51
51 TrackEvent::~TrackEvent() 52 TrackEvent::~TrackEvent()
52 { 53 {
53 } 54 }
54 55
55 const AtomicString& TrackEvent::interfaceName() const 56 const AtomicString& TrackEvent::interfaceName() const
56 { 57 {
57 return EventNames::TrackEvent; 58 return EventNames::TrackEvent;
58 } 59 }
(...skipping 19 matching lines...) Expand all
78 } 79 }
79 80
80 void TrackEvent::trace(Visitor* visitor) 81 void TrackEvent::trace(Visitor* visitor)
81 { 82 {
82 visitor->trace(m_track); 83 visitor->trace(m_track);
83 Event::trace(visitor); 84 Event::trace(visitor);
84 } 85 }
85 86
86 } // namespace blink 87 } // namespace blink
87 88
OLDNEW
« no previous file with comments | « Source/core/html/track/TrackEvent.h ('k') | Source/core/html/track/TrackEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698