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

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

Issue 2160963002: Add watch time metrics for HTML5 media playback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments, couple more tests. Created 4 years, 4 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 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 class GLES2Interface; 65 class GLES2Interface;
66 } 66 }
67 } 67 }
68 68
69 namespace media { 69 namespace media {
70 class ChunkDemuxer; 70 class ChunkDemuxer;
71 class GpuVideoAcceleratorFactories; 71 class GpuVideoAcceleratorFactories;
72 class MediaLog; 72 class MediaLog;
73 class UrlIndex; 73 class UrlIndex;
74 class VideoFrameCompositor; 74 class VideoFrameCompositor;
75 class WatchTimeReporter;
75 class WebAudioSourceProviderImpl; 76 class WebAudioSourceProviderImpl;
76 class WebMediaPlayerDelegate; 77 class WebMediaPlayerDelegate;
77 class WebTextTrackImpl; 78 class WebTextTrackImpl;
78 79
79 // The canonical implementation of blink::WebMediaPlayer that's backed by 80 // The canonical implementation of blink::WebMediaPlayer that's backed by
80 // Pipeline. Handles normal resource loading, Media Source, and 81 // Pipeline. Handles normal resource loading, Media Source, and
81 // Encrypted Media. 82 // Encrypted Media.
82 class MEDIA_BLINK_EXPORT WebMediaPlayerImpl 83 class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
83 : public NON_EXPORTED_BASE(blink::WebMediaPlayer), 84 : public NON_EXPORTED_BASE(blink::WebMediaPlayer),
84 public NON_EXPORTED_BASE(WebMediaPlayerDelegate::Observer), 85 public NON_EXPORTED_BASE(WebMediaPlayerDelegate::Observer),
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 // OnSuspendRequested() is called. If the state is UNKNOWN, the current frame 529 // OnSuspendRequested() is called. If the state is UNKNOWN, the current frame
529 // from the compositor will be queried to see if suspend is supported; the 530 // from the compositor will be queried to see if suspend is supported; the
530 // state will be set to YES or NO respectively if a frame is available. 531 // state will be set to YES or NO respectively if a frame is available.
531 enum class CanSuspendState { UNKNOWN, YES, NO }; 532 enum class CanSuspendState { UNKNOWN, YES, NO };
532 CanSuspendState can_suspend_state_; 533 CanSuspendState can_suspend_state_;
533 534
534 // Called some-time after OnHidden() if the media was suspended in a playing 535 // Called some-time after OnHidden() if the media was suspended in a playing
535 // state as part of the call to OnHidden(). 536 // state as part of the call to OnHidden().
536 base::OneShotTimer background_pause_timer_; 537 base::OneShotTimer background_pause_timer_;
537 538
539 // Monitors the watch time of the played content.
540 bool is_encrypted_;
sandersd (OOO until July 31) 2016/08/04 23:06:26 Swap these two declarations.
DaleCurtis 2016/08/08 23:16:42 Done.
541 std::unique_ptr<WatchTimeReporter> watch_time_reporter_;
542
538 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 543 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
539 }; 544 };
540 545
541 } // namespace media 546 } // namespace media
542 547
543 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 548 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698