OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
9 #include "content/public/renderer/media_stream_renderer_factory.h" | 9 #include "content/public/renderer/media_stream_renderer_factory.h" |
10 #include "content/renderer/media/webmediaplayer_ms.h" | 10 #include "content/renderer/media/webmediaplayer_ms.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 EXPECT_EQ(delegate_id_, delegate_id); | 89 EXPECT_EQ(delegate_id_, delegate_id); |
90 } | 90 } |
91 | 91 |
92 bool IsStale(int delegate_id) override { | 92 bool IsStale(int delegate_id) override { |
93 EXPECT_EQ(delegate_id_, delegate_id); | 93 EXPECT_EQ(delegate_id_, delegate_id); |
94 return false; | 94 return false; |
95 } | 95 } |
96 | 96 |
97 bool IsFrameHidden() override { return is_hidden_; } | 97 bool IsFrameHidden() override { return is_hidden_; } |
98 bool IsFrameClosed() override { return false; } | 98 bool IsFrameClosed() override { return false; } |
99 bool IsBackgroundVideoPlaybackUnlocked() override { return false; } | |
100 | 99 |
101 void set_hidden(bool is_hidden) { is_hidden_ = is_hidden; } | 100 void set_hidden(bool is_hidden) { is_hidden_ = is_hidden; } |
102 | 101 |
103 private: | 102 private: |
104 int delegate_id_ = 1234; | 103 int delegate_id_ = 1234; |
105 Observer* observer_ = nullptr; | 104 Observer* observer_ = nullptr; |
106 bool playing_ = false; | 105 bool playing_ = false; |
107 bool has_video_ = false; | 106 bool has_video_ = false; |
108 bool is_hidden_ = false; | 107 bool is_hidden_ = false; |
109 bool is_gone_ = true; | 108 bool is_gone_ = true; |
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
957 // OnShown() should restart after a forced suspension. | 956 // OnShown() should restart after a forced suspension. |
958 player_->OnFrameShown(); | 957 player_->OnFrameShown(); |
959 EXPECT_FALSE(player_->paused()); | 958 EXPECT_FALSE(player_->paused()); |
960 EXPECT_CALL(*this, DoSetWebLayer(false)); | 959 EXPECT_CALL(*this, DoSetWebLayer(false)); |
961 | 960 |
962 base::RunLoop().RunUntilIdle(); | 961 base::RunLoop().RunUntilIdle(); |
963 } | 962 } |
964 #endif | 963 #endif |
965 | 964 |
966 } // namespace content | 965 } // namespace content |
OLD | NEW |