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

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.h

Issue 893333004: Update {virtual,override,final} to follow C++11 style. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix formatting Created 5 years, 10 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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 virtual double mediaTimeForTimeValue(double timeValue) const; 167 virtual double mediaTimeForTimeValue(double timeValue) const;
168 168
169 // Provide statistics. 169 // Provide statistics.
170 virtual unsigned decodedFrameCount() const; 170 virtual unsigned decodedFrameCount() const;
171 virtual unsigned droppedFrameCount() const; 171 virtual unsigned droppedFrameCount() const;
172 virtual unsigned audioDecodedByteCount() const; 172 virtual unsigned audioDecodedByteCount() const;
173 virtual unsigned videoDecodedByteCount() const; 173 virtual unsigned videoDecodedByteCount() const;
174 174
175 // cc::VideoFrameProvider implementation. These methods are running on the 175 // cc::VideoFrameProvider implementation. These methods are running on the
176 // compositor thread. 176 // compositor thread.
177 virtual void SetVideoFrameProviderClient( 177 void SetVideoFrameProviderClient(
178 cc::VideoFrameProvider::Client* client) override; 178 cc::VideoFrameProvider::Client* client) override;
179 virtual scoped_refptr<media::VideoFrame> GetCurrentFrame() override; 179 scoped_refptr<media::VideoFrame> GetCurrentFrame() override;
180 virtual void PutCurrentFrame(const scoped_refptr<media::VideoFrame>& frame) 180 void PutCurrentFrame(const scoped_refptr<media::VideoFrame>& frame) override;
181 override;
182 181
183 // Media player callback handlers. 182 // Media player callback handlers.
184 void OnMediaMetadataChanged(const base::TimeDelta& duration, int width, 183 void OnMediaMetadataChanged(const base::TimeDelta& duration, int width,
185 int height, bool success); 184 int height, bool success);
186 void OnPlaybackComplete(); 185 void OnPlaybackComplete();
187 void OnBufferingUpdate(int percentage); 186 void OnBufferingUpdate(int percentage);
188 void OnSeekRequest(const base::TimeDelta& time_to_seek); 187 void OnSeekRequest(const base::TimeDelta& time_to_seek);
189 void OnSeekComplete(const base::TimeDelta& current_time); 188 void OnSeekComplete(const base::TimeDelta& current_time);
190 void OnMediaError(int error_type); 189 void OnMediaError(int error_type);
191 void OnVideoSizeChanged(int width, int height); 190 void OnVideoSizeChanged(int width, int height);
192 void OnDurationChanged(const base::TimeDelta& duration); 191 void OnDurationChanged(const base::TimeDelta& duration);
193 192
194 // Called to update the current time. 193 // Called to update the current time.
195 void OnTimeUpdate(base::TimeDelta current_timestamp, 194 void OnTimeUpdate(base::TimeDelta current_timestamp,
196 base::TimeTicks current_time_ticks); 195 base::TimeTicks current_time_ticks);
197 196
198 // Functions called when media player status changes. 197 // Functions called when media player status changes.
199 void OnConnectedToRemoteDevice(const std::string& remote_playback_message); 198 void OnConnectedToRemoteDevice(const std::string& remote_playback_message);
200 void OnDisconnectedFromRemoteDevice(); 199 void OnDisconnectedFromRemoteDevice();
201 void OnDidExitFullscreen(); 200 void OnDidExitFullscreen();
202 void OnMediaPlayerPlay(); 201 void OnMediaPlayerPlay();
203 void OnMediaPlayerPause(); 202 void OnMediaPlayerPause();
204 void OnRequestFullscreen(); 203 void OnRequestFullscreen();
205 void OnRemoteRouteAvailabilityChanged(bool routes_available); 204 void OnRemoteRouteAvailabilityChanged(bool routes_available);
206 205
207 // StreamTextureFactoryContextObserver implementation. 206 // StreamTextureFactoryContextObserver implementation.
208 virtual void ResetStreamTextureProxy() override; 207 void ResetStreamTextureProxy() override;
209 208
210 // Called when the player is released. 209 // Called when the player is released.
211 virtual void OnPlayerReleased(); 210 virtual void OnPlayerReleased();
212 211
213 // This function is called by the RendererMediaPlayerManager to pause the 212 // This function is called by the RendererMediaPlayerManager to pause the
214 // video and release the media player and surface texture when we switch tabs. 213 // video and release the media player and surface texture when we switch tabs.
215 // However, the actual GlTexture is not released to keep the video screenshot. 214 // However, the actual GlTexture is not released to keep the video screenshot.
216 virtual void ReleaseMediaResources(); 215 virtual void ReleaseMediaResources();
217 216
218 // RenderFrameObserver implementation. 217 // RenderFrameObserver implementation.
219 virtual void OnDestruct() override; 218 void OnDestruct() override;
220 219
221 #if defined(VIDEO_HOLE) 220 #if defined(VIDEO_HOLE)
222 // Calculate the boundary rectangle of the media player (i.e. location and 221 // Calculate the boundary rectangle of the media player (i.e. location and
223 // size of the video frame). 222 // size of the video frame).
224 // Returns true if the geometry has been changed since the last call. 223 // Returns true if the geometry has been changed since the last call.
225 bool UpdateBoundaryRectangle(); 224 bool UpdateBoundaryRectangle();
226 225
227 const gfx::RectF GetBoundaryRectangle(); 226 const gfx::RectF GetBoundaryRectangle();
228 #endif // defined(VIDEO_HOLE) 227 #endif // defined(VIDEO_HOLE)
229 228
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 505
507 // NOTE: Weak pointers must be invalidated before all other member variables. 506 // NOTE: Weak pointers must be invalidated before all other member variables.
508 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; 507 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_;
509 508
510 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); 509 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
511 }; 510 };
512 511
513 } // namespace content 512 } // namespace content
514 513
515 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 514 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698