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

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

Issue 2490783002: Refactor WebMediaPlayerDelegate interface. (Closed)
Patch Set: Unit tests found a real bug! Created 3 years, 11 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
« no previous file with comments | « no previous file | content/renderer/media/android/webmediaplayer_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 // Called when the player is released. 206 // Called when the player is released.
207 void OnPlayerReleased() override; 207 void OnPlayerReleased() override;
208 208
209 // This function is called by the RendererMediaPlayerManager to pause the 209 // This function is called by the RendererMediaPlayerManager to pause the
210 // video and release the media player and surface texture when we switch tabs. 210 // video and release the media player and surface texture when we switch tabs.
211 // However, the actual GlTexture is not released to keep the video screenshot. 211 // However, the actual GlTexture is not released to keep the video screenshot.
212 void SuspendAndReleaseResources() override; 212 void SuspendAndReleaseResources() override;
213 213
214 // WebMediaPlayerDelegate::Observer implementation. 214 // WebMediaPlayerDelegate::Observer implementation.
215 void OnHidden() override; 215 void OnFrameHidden() override;
216 void OnShown() override; 216 void OnFrameClosed() override;
217 bool OnSuspendRequested(bool must_suspend) override; 217 void OnFrameShown() override;
218 void OnIdleTimeout() override;
218 void OnPlay() override; 219 void OnPlay() override;
219 void OnPause() override; 220 void OnPause() override;
220 void OnVolumeMultiplierUpdate(double multiplier) override; 221 void OnVolumeMultiplierUpdate(double multiplier) override;
221 222
222 protected: 223 protected:
223 // Helper method to update the playing state. 224 // Helper method to update the playing state.
224 void UpdatePlayingState(bool is_playing_); 225 void UpdatePlayingState(bool is_playing_);
225 226
226 // Helper methods for posting task for setting states and update WebKit. 227 // Helper methods for posting task for setting states and update WebKit.
227 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state); 228 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state);
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 425
425 // NOTE: Weak pointers must be invalidated before all other member variables. 426 // NOTE: Weak pointers must be invalidated before all other member variables.
426 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; 427 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_;
427 428
428 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); 429 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
429 }; 430 };
430 431
431 } // namespace content 432 } // namespace content
432 433
433 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 434 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/android/webmediaplayer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698