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

Side by Side Diff: media/blink/webmediaplayer_impl.h

Issue 2705213007: [Video] MediaSession API event handlers can resume background video. (Closed)
Patch Set: Fixed WMPA Created 3 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
« no previous file with comments | « media/blink/webmediaplayer_delegate.h ('k') | media/blink/webmediaplayer_impl.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 MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // (Public for testing.) 237 // (Public for testing.)
238 struct PlayState { 238 struct PlayState {
239 DelegateState delegate_state; 239 DelegateState delegate_state;
240 bool is_idle; 240 bool is_idle;
241 bool is_memory_reporting_enabled; 241 bool is_memory_reporting_enabled;
242 bool is_suspended; 242 bool is_suspended;
243 }; 243 };
244 244
245 private: 245 private:
246 friend class WebMediaPlayerImplTest; 246 friend class WebMediaPlayerImplTest;
247 friend class WebMediaPlayerImplBackgroundBehaviorTest;
247 248
248 void EnableOverlay(); 249 void EnableOverlay();
249 void DisableOverlay(); 250 void DisableOverlay();
250 251
251 void OnPipelineSuspended(); 252 void OnPipelineSuspended();
252 void OnBeforePipelineResume(); 253 void OnBeforePipelineResume();
253 void OnPipelineResumed(); 254 void OnPipelineResumed();
254 void OnDemuxerOpened(); 255 void OnDemuxerOpened();
255 256
256 // Pipeline::Client overrides. 257 // Pipeline::Client overrides.
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 681
681 // Whether the pipeline is being resumed at the moment. 682 // Whether the pipeline is being resumed at the moment.
682 bool is_pipeline_resuming_ = false; 683 bool is_pipeline_resuming_ = false;
683 684
684 // Pipeline statistics overridden by tests. 685 // Pipeline statistics overridden by tests.
685 base::Optional<PipelineStatistics> pipeline_statistics_for_test_; 686 base::Optional<PipelineStatistics> pipeline_statistics_for_test_;
686 687
687 // Pipeline media duration overridden by tests. 688 // Pipeline media duration overridden by tests.
688 base::Optional<base::TimeDelta> pipeline_media_duration_for_test_; 689 base::Optional<base::TimeDelta> pipeline_media_duration_for_test_;
689 690
691 // Whether the video requires a user gesture to resume after it was paused in
692 // the background. Affects the value of ShouldPauseVideoWhenHidden().
693 bool video_locked_when_paused_when_hidden_ = false;
694
690 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 695 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
691 }; 696 };
692 697
693 } // namespace media 698 } // namespace media
694 699
695 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 700 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_delegate.h ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698