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

Side by Side Diff: content/renderer/media/webmediaplayer_ms_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, 9 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 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 void ClearStaleFlag(int delegate_id) override { 88 void ClearStaleFlag(int delegate_id) override {
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 void SetIsEffectivelyFullscreen(int delegate_id,
98 bool is_fullscreen) override {
99 EXPECT_EQ(delegate_id_, delegate_id);
100 }
101
97 bool IsFrameHidden() override { return is_hidden_; } 102 bool IsFrameHidden() override { return is_hidden_; }
98 bool IsFrameClosed() override { return false; } 103 bool IsFrameClosed() override { return false; }
99 bool IsBackgroundVideoPlaybackUnlocked() override { return false; } 104 bool IsBackgroundVideoPlaybackUnlocked() override { return false; }
100 105
101 void set_hidden(bool is_hidden) { is_hidden_ = is_hidden; } 106 void set_hidden(bool is_hidden) { is_hidden_ = is_hidden; }
102 107
103 private: 108 private:
104 int delegate_id_ = 1234; 109 int delegate_id_ = 1234;
105 Observer* observer_ = nullptr; 110 Observer* observer_ = nullptr;
106 bool playing_ = false; 111 bool playing_ = false;
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 // OnShown() should restart after a forced suspension. 962 // OnShown() should restart after a forced suspension.
958 player_->OnFrameShown(); 963 player_->OnFrameShown();
959 EXPECT_FALSE(player_->paused()); 964 EXPECT_FALSE(player_->paused());
960 EXPECT_CALL(*this, DoSetWebLayer(false)); 965 EXPECT_CALL(*this, DoSetWebLayer(false));
961 966
962 base::RunLoop().RunUntilIdle(); 967 base::RunLoop().RunUntilIdle();
963 } 968 }
964 #endif 969 #endif
965 970
966 } // namespace content 971 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/renderer_webmediaplayer_delegate.cc ('k') | media/blink/webmediaplayer_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698