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

Side by Side Diff: content/renderer/media/webmediaplayer_ms.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: Fixup API comments. 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_WEBMEDIAPLAYER_MS_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_
6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 bool didPassCORSAccessCheck() const override; 128 bool didPassCORSAccessCheck() const override;
129 129
130 double mediaTimeForTimeValue(double timeValue) const override; 130 double mediaTimeForTimeValue(double timeValue) const override;
131 131
132 unsigned decodedFrameCount() const override; 132 unsigned decodedFrameCount() const override;
133 unsigned droppedFrameCount() const override; 133 unsigned droppedFrameCount() const override;
134 size_t audioDecodedByteCount() const override; 134 size_t audioDecodedByteCount() const override;
135 size_t videoDecodedByteCount() const override; 135 size_t videoDecodedByteCount() const override;
136 136
137 // WebMediaPlayerDelegate::Observer implementation. 137 // WebMediaPlayerDelegate::Observer implementation.
138 void OnHidden(bool must_suspend) override; 138 void OnHidden() override;
139 void OnShown() override; 139 void OnShown() override;
140 void OnSuspendRequested(bool must_suspend) override;
140 void OnPlay() override; 141 void OnPlay() override;
141 void OnPause() override; 142 void OnPause() override;
142 void OnVolumeMultiplierUpdate(double multiplier) override; 143 void OnVolumeMultiplierUpdate(double multiplier) override;
143 144
144 bool copyVideoTextureToPlatformTexture( 145 bool copyVideoTextureToPlatformTexture(
145 blink::WebGraphicsContext3D* web_graphics_context, 146 blink::WebGraphicsContext3D* web_graphics_context,
146 unsigned int texture, 147 unsigned int texture,
147 unsigned int internal_format, 148 unsigned int internal_format,
148 unsigned int type, 149 unsigned int type,
149 bool premultiply_alpha, 150 bool premultiply_alpha,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 const std::string initial_audio_output_device_id_; 217 const std::string initial_audio_output_device_id_;
217 const url::Origin initial_security_origin_; 218 const url::Origin initial_security_origin_;
218 219
219 // The last volume received by setVolume() and the last volume multiplier from 220 // The last volume received by setVolume() and the last volume multiplier from
220 // OnVolumeMultiplierUpdate(). The multiplier is typical 1.0, but may be less 221 // OnVolumeMultiplierUpdate(). The multiplier is typical 1.0, but may be less
221 // if the WebMediaPlayerDelegate has requested a volume reduction (ducking) 222 // if the WebMediaPlayerDelegate has requested a volume reduction (ducking)
222 // for a transient sound. Playout volume is derived by volume * multiplier. 223 // for a transient sound. Playout volume is derived by volume * multiplier.
223 double volume_; 224 double volume_;
224 double volume_multiplier_; 225 double volume_multiplier_;
225 226
226 // True if the delegate forced a pause during the last OnHidden() call. 227 // True if playback should be started upon the next call to OnShown(). Only
227 bool paused_on_hidden_; 228 // used on Android.
229 bool should_play_upon_shown_;
228 230
229 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMS); 231 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMS);
230 }; 232 };
231 233
232 } // namespace content 234 } // namespace content
233 235
234 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_ 236 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_
OLDNEW
« no previous file with comments | « content/renderer/media/renderer_webmediaplayer_delegate_browsertest.cc ('k') | content/renderer/media/webmediaplayer_ms.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698