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

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: Removed GTK change since the file is gone now. 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 virtual bool supportsSave() const { return false; } 63 virtual bool supportsSave() const { return false; }
64 virtual bool supportsScanning() const { return false; } 64 virtual bool supportsScanning() const { return false; }
65 65
66 virtual IntSize naturalSize() const = 0; 66 virtual IntSize naturalSize() const = 0;
67 67
68 virtual bool hasVideo() const = 0; 68 virtual bool hasVideo() const = 0;
69 virtual bool hasAudio() const = 0; 69 virtual bool hasAudio() const = 0;
70 70
71 virtual void setVisible(bool) = 0; 71 virtual void setVisible(bool) = 0;
72 72
73 virtual float duration() const = 0; 73 virtual double duration() const { return 0; }
74 74
75 virtual float currentTime() const = 0; 75 virtual double currentTime() const { return 0; }
76 virtual void seek(float time) = 0; 76
77 virtual void seek(double) { }
78
77 virtual bool seeking() const = 0; 79 virtual bool seeking() const = 0;
78 80
79 virtual float startTime() const { return 0; } 81 virtual double startTime() const { return 0; }
80
81 virtual double initialTime() const { return 0; } 82 virtual double initialTime() const { return 0; }
82 83
83 virtual void setRate(float) = 0; 84 virtual void setRate(double) { }
85
84 virtual void setPreservesPitch(bool) { } 86 virtual void setPreservesPitch(bool) { }
85 87
86 virtual bool paused() const = 0; 88 virtual bool paused() const = 0;
87 89
88 virtual void setVolume(float) = 0; 90 virtual void setVolume(double) { }
89 91
90 virtual bool supportsMuting() const { return false; } 92 virtual bool supportsMuting() const { return false; }
91 virtual void setMuted(bool) { } 93 virtual void setMuted(bool) { }
92 94
93 virtual bool hasClosedCaptions() const { return false; } 95 virtual bool hasClosedCaptions() const { return false; }
94 virtual void setClosedCaptionsVisible(bool) { } 96 virtual void setClosedCaptionsVisible(bool) { }
95 97
96 virtual MediaPlayer::NetworkState networkState() const = 0; 98 virtual MediaPlayer::NetworkState networkState() const = 0;
97 virtual MediaPlayer::ReadyState readyState() const = 0; 99 virtual MediaPlayer::ReadyState readyState() const = 0;
98 100
99 virtual PassRefPtr<TimeRanges> seekable() const { return maxTimeSeekable() ? TimeRanges::create(0, maxTimeSeekable()) : TimeRanges::create(); } 101 virtual PassRefPtr<TimeRanges> seekable() const { return maxTimeSeekable() ? TimeRanges::create(0, maxTimeSeekable()) : TimeRanges::create(); }
100 virtual float maxTimeSeekable() const = 0; 102 virtual double maxTimeSeekable() const { return 0; }
101 virtual PassRefPtr<TimeRanges> buffered() const = 0; 103 virtual PassRefPtr<TimeRanges> buffered() const = 0;
102 104
103 virtual bool didLoadingProgress() const = 0; 105 virtual bool didLoadingProgress() const = 0;
104 106
105 virtual void setSize(const IntSize&) = 0; 107 virtual void setSize(const IntSize&) = 0;
106 108
107 virtual void paint(GraphicsContext*, const IntRect&) = 0; 109 virtual void paint(GraphicsContext*, const IntRect&) = 0;
108 110
109 virtual void paintCurrentFrameInContext(GraphicsContext* c, const IntRect& r ) { paint(c, r); } 111 virtual void paintCurrentFrameInContext(GraphicsContext* c, const IntRect& r ) { paint(c, r); }
110 virtual bool copyVideoTextureToPlatformTexture(GraphicsContext3D*, Platform3 DObject, GC3Dint, GC3Denum, GC3Denum, bool, bool) { return false; } 112 virtual bool copyVideoTextureToPlatformTexture(GraphicsContext3D*, Platform3 DObject, GC3Dint, GC3Denum, GC3Denum, bool, bool) { return false; }
(...skipping 30 matching lines...) Expand all
141 virtual bool hasSingleSecurityOrigin() const { return false; } 143 virtual bool hasSingleSecurityOrigin() const { return false; }
142 144
143 virtual bool didPassCORSAccessCheck() const { return false; } 145 virtual bool didPassCORSAccessCheck() const { return false; }
144 146
145 virtual MediaPlayer::MovieLoadType movieLoadType() const { return MediaPlaye r::Unknown; } 147 virtual MediaPlayer::MovieLoadType movieLoadType() const { return MediaPlaye r::Unknown; }
146 148
147 virtual void prepareForRendering() { } 149 virtual void prepareForRendering() { }
148 150
149 // Time value in the movie's time scale. It is only necessary to override th is if the media 151 // Time value in the movie's time scale. It is only necessary to override th is if the media
150 // engine uses rational numbers to represent media time. 152 // engine uses rational numbers to represent media time.
151 virtual float mediaTimeForTimeValue(float timeValue) const { return timeValu e; } 153 virtual double mediaTimeForTimeValue(double timeValue) const { return timeVa lue; }
152 154
153 // Overide this if it is safe for HTMLMediaElement to cache movie time and r eport 155 // Overide this if it is safe for HTMLMediaElement to cache movie time and r eport
154 // 'currentTime' as [cached time + elapsed wall time]. Returns the maximum w all time 156 // 'currentTime' as [cached time + elapsed wall time]. Returns the maximum w all time
155 // it is OK to calculate movie time before refreshing the cached time. 157 // it is OK to calculate movie time before refreshing the cached time.
156 virtual double maximumDurationToCacheMediaTime() const { return 0; } 158 virtual double maximumDurationToCacheMediaTime() const { return 0; }
157 159
158 virtual unsigned decodedFrameCount() const { return 0; } 160 virtual unsigned decodedFrameCount() const { return 0; }
159 virtual unsigned droppedFrameCount() const { return 0; } 161 virtual unsigned droppedFrameCount() const { return 0; }
160 virtual unsigned audioDecodedByteCount() const { return 0; } 162 virtual unsigned audioDecodedByteCount() const { return 0; }
161 virtual unsigned videoDecodedByteCount() const { return 0; } 163 virtual unsigned videoDecodedByteCount() const { return 0; }
(...skipping 28 matching lines...) Expand all
190 192
191 #if USE(GSTREAMER) 193 #if USE(GSTREAMER)
192 virtual void simulateAudioInterruption() { } 194 virtual void simulateAudioInterruption() { }
193 #endif 195 #endif
194 }; 196 };
195 197
196 } 198 }
197 199
198 #endif 200 #endif
199 #endif 201 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698