| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |