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

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

Issue 1766783003: Expand suspension of idle media players to all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@notify_pause
Patch Set: Cleanup. Created 4 years, 9 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 void OnMediaSourceOpened(blink::WebMediaSource* web_media_source); 238 void OnMediaSourceOpened(blink::WebMediaSource* web_media_source);
239 239
240 void OnEncryptedMediaInitData(media::EmeInitDataType init_data_type, 240 void OnEncryptedMediaInitData(media::EmeInitDataType init_data_type,
241 const std::vector<uint8_t>& init_data); 241 const std::vector<uint8_t>& init_data);
242 242
243 // Called when a decoder detects that the key needed to decrypt the stream 243 // Called when a decoder detects that the key needed to decrypt the stream
244 // is not available. 244 // is not available.
245 void OnWaitingForDecryptionKey() override; 245 void OnWaitingForDecryptionKey() override;
246 246
247 // WebMediaPlayerDelegate::Observer implementation. 247 // WebMediaPlayerDelegate::Observer implementation.
248 void OnHidden(bool must_suspend) override; 248 void OnHidden() override;
249 void OnShown() override; 249 void OnShown() override;
250 void OnSuspend(bool must_suspend) override;
250 void OnPlay() override; 251 void OnPlay() override;
251 void OnPause() override; 252 void OnPause() override;
252 void OnVolumeMultiplierUpdate(double multiplier) override; 253 void OnVolumeMultiplierUpdate(double multiplier) override;
253 254
254 protected: 255 protected:
255 // Helper method to update the playing state. 256 // Helper method to update the playing state.
256 void UpdatePlayingState(bool is_playing_); 257 void UpdatePlayingState(bool is_playing_);
257 258
258 // Helper methods for posting task for setting states and update WebKit. 259 // Helper methods for posting task for setting states and update WebKit.
259 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state); 260 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state);
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 512
512 // NOTE: Weak pointers must be invalidated before all other member variables. 513 // NOTE: Weak pointers must be invalidated before all other member variables.
513 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; 514 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_;
514 515
515 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); 516 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
516 }; 517 };
517 518
518 } // namespace content 519 } // namespace content
519 520
520 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 521 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698