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

Side by Side Diff: Source/WebKit/chromium/public/WebMediaPlayer.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 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 virtual void load(const WebURL&, CORSMode) = 0; 99 virtual void load(const WebURL&, CORSMode) = 0;
100 virtual void load(const WebURL&, WebMediaSource*, CORSMode) = 0; 100 virtual void load(const WebURL&, WebMediaSource*, CORSMode) = 0;
101 virtual void cancelLoad() = 0; 101 virtual void cancelLoad() = 0;
102 102
103 // Playback controls. 103 // Playback controls.
104 virtual void play() = 0; 104 virtual void play() = 0;
105 virtual void pause() = 0; 105 virtual void pause() = 0;
106 virtual bool supportsFullscreen() const = 0; 106 virtual bool supportsFullscreen() const = 0;
107 virtual bool supportsSave() const = 0; 107 virtual bool supportsSave() const = 0;
108 virtual void seek(float seconds) = 0; 108 virtual void seekFloat(float seconds) = 0;
109 virtual void setEndTime(float seconds) = 0; 109 virtual void setEndTimeFloat(float seconds) = 0;
110 virtual void setRate(float) = 0; 110 virtual void setRateFloat(float rate) = 0;
111 virtual void setVolume(float) = 0; 111 virtual void setVolumeFloat(float volume) = 0;
112 virtual void setVisible(bool) = 0; 112 virtual void setVisible(bool) = 0;
113 virtual void setPreload(Preload) { }; 113 virtual void setPreload(Preload) { };
114 virtual bool totalBytesKnown() = 0; 114 virtual bool totalBytesKnown() = 0;
115 virtual const WebTimeRanges& buffered() = 0; 115 virtual const WebTimeRanges& buffered() = 0;
116 virtual float maxTimeSeekable() const = 0; 116 virtual float maxTimeSeekableFloat() const = 0;
117 117
118 virtual void setSize(const WebSize&) = 0; 118 virtual void setSize(const WebSize&) = 0;
119 119
120 virtual void paint(WebCanvas*, const WebRect&, uint8_t alpha) = 0; 120 virtual void paint(WebCanvas*, const WebRect&, uint8_t alpha) = 0;
121 121
122 // True if the loaded media has a playable video/audio track. 122 // True if the loaded media has a playable video/audio track.
123 virtual bool hasVideo() const = 0; 123 virtual bool hasVideo() const = 0;
124 virtual bool hasAudio() const = 0; 124 virtual bool hasAudio() const = 0;
125 125
126 // Dimension of the video. 126 // Dimension of the video.
127 virtual WebSize naturalSize() const = 0; 127 virtual WebSize naturalSize() const = 0;
128 128
129 // Getters of playback state. 129 // Getters of playback state.
130 virtual bool paused() const = 0; 130 virtual bool paused() const = 0;
131 virtual bool seeking() const = 0; 131 virtual bool seeking() const = 0;
132 virtual float duration() const = 0; 132 virtual float durationFloat() const = 0;
133 virtual float currentTime() const = 0; 133 virtual float currentTimeFloat() const = 0;
134 134
135 // Get rate of loading the resource. 135 // Get rate of loading the resource.
136 virtual int dataRate() const = 0; 136 virtual int dataRate() const = 0;
137 137
138 // Internal states of loading and network. 138 // Internal states of loading and network.
139 virtual NetworkState networkState() const = 0; 139 virtual NetworkState networkState() const = 0;
140 virtual ReadyState readyState() const = 0; 140 virtual ReadyState readyState() const = 0;
141 141
142 virtual bool didLoadingProgress() const = 0; 142 virtual bool didLoadingProgress() const = 0;
143 virtual unsigned long long totalBytes() const = 0; 143 virtual unsigned long long totalBytes() const = 0;
144 144
145 virtual bool hasSingleSecurityOrigin() const = 0; 145 virtual bool hasSingleSecurityOrigin() const = 0;
146 virtual bool didPassCORSAccessCheck() const = 0; 146 virtual bool didPassCORSAccessCheck() const = 0;
147 virtual MovieLoadType movieLoadType() const = 0; 147 virtual MovieLoadType movieLoadType() const = 0;
148 148
149 virtual float mediaTimeForTimeValue(float timeValue) const = 0; 149 virtual float mediaTimeForTimeValueFloat(float timeValue) const = 0;
150 150
151 virtual unsigned decodedFrameCount() const = 0; 151 virtual unsigned decodedFrameCount() const = 0;
152 virtual unsigned droppedFrameCount() const = 0; 152 virtual unsigned droppedFrameCount() const = 0;
153 virtual unsigned audioDecodedByteCount() const = 0; 153 virtual unsigned audioDecodedByteCount() const = 0;
154 virtual unsigned videoDecodedByteCount() const = 0; 154 virtual unsigned videoDecodedByteCount() const = 0;
155 155
156 // Do a GPU-GPU textures copy if possible. 156 // Do a GPU-GPU textures copy if possible.
157 virtual bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, unsign ed texture, unsigned level, unsigned internalFormat, bool premultiplyAlpha, bool flipY) { return false; } 157 virtual bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, unsign ed texture, unsigned level, unsigned internalFormat, bool premultiplyAlpha, bool flipY) { return false; }
158 158
159 virtual WebAudioSourceProvider* audioSourceProvider() { return 0; } 159 virtual WebAudioSourceProvider* audioSourceProvider() { return 0; }
160 160
161 // Returns whether keySystem is supported. If true, the result will be 161 // Returns whether keySystem is supported. If true, the result will be
162 // reported by an event. 162 // reported by an event.
163 virtual MediaKeyException generateKeyRequest(const WebString& keySystem, con st unsigned char* initData, unsigned initDataLength) { return MediaKeyExceptionK eySystemNotSupported; } 163 virtual MediaKeyException generateKeyRequest(const WebString& keySystem, con st unsigned char* initData, unsigned initDataLength) { return MediaKeyExceptionK eySystemNotSupported; }
164 virtual MediaKeyException addKey(const WebString& keySystem, const unsigned char* key, unsigned keyLength, const unsigned char* initData, unsigned initDataL ength, const WebString& sessionId) { return MediaKeyExceptionKeySystemNotSupport ed; } 164 virtual MediaKeyException addKey(const WebString& keySystem, const unsigned char* key, unsigned keyLength, const unsigned char* initData, unsigned initDataL ength, const WebString& sessionId) { return MediaKeyExceptionKeySystemNotSupport ed; }
165 virtual MediaKeyException cancelKeyRequest(const WebString& keySystem, const WebString& sessionId) { return MediaKeyExceptionKeySystemNotSupported; } 165 virtual MediaKeyException cancelKeyRequest(const WebString& keySystem, const WebString& sessionId) { return MediaKeyExceptionKeySystemNotSupported; }
166 166
167 // Instruct WebMediaPlayer to enter/exit fullscreen. 167 // Instruct WebMediaPlayer to enter/exit fullscreen.
168 virtual void enterFullscreen() { } 168 virtual void enterFullscreen() { }
169 virtual void exitFullscreen() { } 169 virtual void exitFullscreen() { }
170 // Returns true if the player can enter fullscreen. 170 // Returns true if the player can enter fullscreen.
171 virtual bool canEnterFullscreen() const { return false; } 171 virtual bool canEnterFullscreen() const { return false; }
172 }; 172 };
173 173
174 } // namespace WebKit 174 } // namespace WebKit
175 175
176 #endif 176 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698