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

Side by Side Diff: media/blink/webmediaplayer_impl_unittest.cc

Issue 2693203002: Provide a WebContents API to discover the playback of a fullscreen video. (Closed)
Patch Set: apply review comments 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_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "media/blink/webmediaplayer_impl.h" 5 #include "media/blink/webmediaplayer_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 void ClearStaleFlag(int player_id) override { 139 void ClearStaleFlag(int player_id) override {
140 DCHECK_EQ(player_id_, player_id); 140 DCHECK_EQ(player_id_, player_id);
141 is_stale_ = false; 141 is_stale_ = false;
142 } 142 }
143 143
144 bool IsStale(int player_id) override { 144 bool IsStale(int player_id) override {
145 DCHECK_EQ(player_id_, player_id); 145 DCHECK_EQ(player_id_, player_id);
146 return is_stale_; 146 return is_stale_;
147 } 147 }
148 148
149 void SetIsEffectivelyFullscreen(int player_id, bool value) override {
150 DCHECK_EQ(player_id_, player_id);
151 }
152
149 bool IsFrameHidden() override { return is_hidden_; } 153 bool IsFrameHidden() override { return is_hidden_; }
150 154
151 bool IsFrameClosed() override { return is_closed_; } 155 bool IsFrameClosed() override { return is_closed_; }
152 156
153 void SetIdleForTesting(bool is_idle) { is_idle_ = is_idle; } 157 void SetIdleForTesting(bool is_idle) { is_idle_ = is_idle; }
154 158
155 void SetStaleForTesting(bool is_stale) { 159 void SetStaleForTesting(bool is_stale) {
156 is_idle_ |= is_stale; 160 is_idle_ |= is_stale;
157 is_stale_ = is_stale; 161 is_stale_ = is_stale;
158 } 162 }
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 785
782 // Average keyframe distance is too big. 786 // Average keyframe distance is too big.
783 SetVideoKeyframeDistanceAverage(base::TimeDelta::FromSeconds(100)); 787 SetVideoKeyframeDistanceAverage(base::TimeDelta::FromSeconds(100));
784 SetDuration(base::TimeDelta::FromSeconds(300)); 788 SetDuration(base::TimeDelta::FromSeconds(300));
785 EXPECT_FALSE(IsBackgroundOptimizationCandidate()); 789 EXPECT_FALSE(IsBackgroundOptimizationCandidate());
786 EXPECT_FALSE(ShouldPauseVideoWhenHidden()); 790 EXPECT_FALSE(ShouldPauseVideoWhenHidden());
787 EXPECT_FALSE(ShouldDisableVideoWhenHidden()); 791 EXPECT_FALSE(ShouldDisableVideoWhenHidden());
788 } 792 }
789 793
790 } // namespace media 794 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698