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

Side by Side Diff: Source/WebCore/platform/graphics/MediaPlayerPrivate.h

Issue 13454026: Update all float attributes in HTMLMediaElement and related objects to double (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Change WebMediaPlayer to only have the xxxFloat methods. Created 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011, 2012, 2013 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 virtual bool supportsSave() const { return false; } 61 virtual bool supportsSave() const { return false; }
62 virtual bool supportsScanning() const { return false; } 62 virtual bool supportsScanning() const { return false; }
63 63
64 virtual IntSize naturalSize() const = 0; 64 virtual IntSize naturalSize() const = 0;
65 65
66 virtual bool hasVideo() const = 0; 66 virtual bool hasVideo() const = 0;
67 virtual bool hasAudio() const = 0; 67 virtual bool hasAudio() const = 0;
68 68
69 virtual void setVisible(bool) = 0; 69 virtual void setVisible(bool) = 0;
70 70
71 virtual float duration() const = 0; 71 virtual double duration() const { return 0; }
72 72
73 virtual float currentTime() const = 0; 73 virtual double currentTime() const { return 0; }
74 virtual void seek(float time) = 0; 74
75 virtual void seek(double) { }
76
75 virtual bool seeking() const = 0; 77 virtual bool seeking() const = 0;
76 78
77 virtual float startTime() const { return 0; } 79 virtual double startTime() const { return 0; }
78
79 virtual double initialTime() const { return 0; } 80 virtual double initialTime() const { return 0; }
80 81
81 virtual void setRate(float) = 0; 82 virtual void setRate(double) { }
83
82 virtual void setPreservesPitch(bool) { } 84 virtual void setPreservesPitch(bool) { }
83 85
84 virtual bool paused() const = 0; 86 virtual bool paused() const = 0;
85 87
86 virtual void setVolume(float) = 0; 88 virtual void setVolume(double) { }
87 89
88 virtual bool supportsMuting() const { return false; } 90 virtual bool supportsMuting() const { return false; }
89 virtual void setMuted(bool) { } 91 virtual void setMuted(bool) { }
90 92
91 virtual bool hasClosedCaptions() const { return false; } 93 virtual bool hasClosedCaptions() const { return false; }
92 virtual void setClosedCaptionsVisible(bool) { } 94 virtual void setClosedCaptionsVisible(bool) { }
93 95
94 virtual MediaPlayer::NetworkState networkState() const = 0; 96 virtual MediaPlayer::NetworkState networkState() const = 0;
95 virtual MediaPlayer::ReadyState readyState() const = 0; 97 virtual MediaPlayer::ReadyState readyState() const = 0;
96 98
97 virtual PassRefPtr<TimeRanges> seekable() const { return maxTimeSeekable() ? TimeRanges::create(0, maxTimeSeekable()) : TimeRanges::create(); } 99 virtual PassRefPtr<TimeRanges> seekable() const { return maxTimeSeekable() ? TimeRanges::create(0, maxTimeSeekable()) : TimeRanges::create(); }
98 virtual float maxTimeSeekable() const = 0; 100 virtual double maxTimeSeekable() const { return 0; }
99 virtual PassRefPtr<TimeRanges> buffered() const = 0; 101 virtual PassRefPtr<TimeRanges> buffered() const = 0;
100 102
101 virtual bool didLoadingProgress() const = 0; 103 virtual bool didLoadingProgress() const = 0;
102 104
103 virtual void setSize(const IntSize&) = 0; 105 virtual void setSize(const IntSize&) = 0;
104 106
105 virtual void paint(GraphicsContext*, const IntRect&) = 0; 107 virtual void paint(GraphicsContext*, const IntRect&) = 0;
106 108
107 virtual void paintCurrentFrameInContext(GraphicsContext* c, const IntRect& r ) { paint(c, r); } 109 virtual void paintCurrentFrameInContext(GraphicsContext* c, const IntRect& r ) { paint(c, r); }
108 virtual bool copyVideoTextureToPlatformTexture(GraphicsContext3D*, Platform3 DObject, GC3Dint, GC3Denum, GC3Denum, bool, bool) { return false; } 110 virtual bool copyVideoTextureToPlatformTexture(GraphicsContext3D*, Platform3 DObject, GC3Dint, GC3Denum, GC3Denum, bool, bool) { return false; }
(...skipping 30 matching lines...) Expand all
139 virtual bool hasSingleSecurityOrigin() const { return false; } 141 virtual bool hasSingleSecurityOrigin() const { return false; }
140 142
141 virtual bool didPassCORSAccessCheck() const { return false; } 143 virtual bool didPassCORSAccessCheck() const { return false; }
142 144
143 virtual MediaPlayer::MovieLoadType movieLoadType() const { return MediaPlaye r::Unknown; } 145 virtual MediaPlayer::MovieLoadType movieLoadType() const { return MediaPlaye r::Unknown; }
144 146
145 virtual void prepareForRendering() { } 147 virtual void prepareForRendering() { }
146 148
147 // Time value in the movie's time scale. It is only necessary to override th is if the media 149 // Time value in the movie's time scale. It is only necessary to override th is if the media
148 // engine uses rational numbers to represent media time. 150 // engine uses rational numbers to represent media time.
149 virtual float mediaTimeForTimeValue(float timeValue) const { return timeValu e; } 151 virtual double mediaTimeForTimeValue(double timeValue) const { return timeVa lue; }
150 152
151 // Overide this if it is safe for HTMLMediaElement to cache movie time and r eport 153 // Overide this if it is safe for HTMLMediaElement to cache movie time and r eport
152 // 'currentTime' as [cached time + elapsed wall time]. Returns the maximum w all time 154 // 'currentTime' as [cached time + elapsed wall time]. Returns the maximum w all time
153 // it is OK to calculate movie time before refreshing the cached time. 155 // it is OK to calculate movie time before refreshing the cached time.
154 virtual double maximumDurationToCacheMediaTime() const { return 0; } 156 virtual double maximumDurationToCacheMediaTime() const { return 0; }
155 157
156 virtual unsigned decodedFrameCount() const { return 0; } 158 virtual unsigned decodedFrameCount() const { return 0; }
157 virtual unsigned droppedFrameCount() const { return 0; } 159 virtual unsigned droppedFrameCount() const { return 0; }
158 virtual unsigned audioDecodedByteCount() const { return 0; } 160 virtual unsigned audioDecodedByteCount() const { return 0; }
159 virtual unsigned videoDecodedByteCount() const { return 0; } 161 virtual unsigned videoDecodedByteCount() const { return 0; }
(...skipping 28 matching lines...) Expand all
188 190
189 #if USE(GSTREAMER) 191 #if USE(GSTREAMER)
190 virtual void simulateAudioInterruption() { } 192 virtual void simulateAudioInterruption() { }
191 #endif 193 #endif
192 }; 194 };
193 195
194 } 196 }
195 197
196 #endif 198 #endif
197 #endif 199 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698