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

Unified Diff: remoting/host/ipc_desktop_environment_unittest.cc

Issue 13983010: Use webrtc::DesktopCapturer for screen capturer implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/desktop_session_win.cc ('k') | remoting/host/ipc_video_frame_capturer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/ipc_desktop_environment_unittest.cc
diff --git a/remoting/host/ipc_desktop_environment_unittest.cc b/remoting/host/ipc_desktop_environment_unittest.cc
index 1318091bf57c4545b0daa78434e947d3d343b4f1..4e54b1dbca8bab5eee97413a452a31df7a11f11a 100644
--- a/remoting/host/ipc_desktop_environment_unittest.cc
+++ b/remoting/host/ipc_desktop_environment_unittest.cc
@@ -32,6 +32,8 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkRegion.h"
+#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
+#include "third_party/webrtc/modules/desktop_capture/desktop_region.h"
using testing::_;
using testing::AnyNumber;
@@ -199,7 +201,7 @@ class IpcDesktopEnvironmentTest : public testing::Test {
// The last |terminal_id| passed to ConnectTermina();
int terminal_id_;
- media::MockScreenCapturerDelegate screen_capturer_delegate_;
+ media::MockScreenCapturerCallback screen_capturer_callback_;
MockClientSessionControl client_session_control_;
base::WeakPtrFactory<ClientSessionControl> client_session_control_factory_;
@@ -440,7 +442,7 @@ TEST_F(IpcDesktopEnvironmentTest, CaptureFrame) {
// Start the input injector and screen capturer.
input_injector_->Start(clipboard_stub.PassAs<protocol::ClipboardStub>());
- video_capturer_->Start(&screen_capturer_delegate_);
+ video_capturer_->Start(&screen_capturer_callback_);
// Run the message loop until the desktop is attached.
setup_run_loop_->Run();
@@ -454,12 +456,12 @@ TEST_F(IpcDesktopEnvironmentTest, CaptureFrame) {
.Times(0);
// Stop the test when the first frame is captured.
- EXPECT_CALL(screen_capturer_delegate_, OnCaptureCompleted(_))
+ EXPECT_CALL(screen_capturer_callback_, OnCaptureCompleted(_))
.WillOnce(InvokeWithoutArgs(
this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment));
// Capture a single frame.
- video_capturer_->CaptureFrame();
+ video_capturer_->Capture(webrtc::DesktopRegion());
task_runner_ = NULL;
io_task_runner_ = NULL;
@@ -475,7 +477,7 @@ TEST_F(IpcDesktopEnvironmentTest, Reattach) {
// Start the input injector and screen capturer.
input_injector_->Start(clipboard_stub.PassAs<protocol::ClipboardStub>());
- video_capturer_->Start(&screen_capturer_delegate_);
+ video_capturer_->Start(&screen_capturer_callback_);
// Run the message loop until the desktop is attached.
setup_run_loop_->Run();
@@ -516,7 +518,7 @@ TEST_F(IpcDesktopEnvironmentTest, InjectClipboardEvent) {
// Start the input injector and screen capturer.
input_injector_->Start(clipboard_stub.PassAs<protocol::ClipboardStub>());
- video_capturer_->Start(&screen_capturer_delegate_);
+ video_capturer_->Start(&screen_capturer_callback_);
// Run the message loop until the desktop is attached.
setup_run_loop_->Run();
@@ -551,7 +553,7 @@ TEST_F(IpcDesktopEnvironmentTest, InjectKeyEvent) {
// Start the input injector and screen capturer.
input_injector_->Start(clipboard_stub.PassAs<protocol::ClipboardStub>());
- video_capturer_->Start(&screen_capturer_delegate_);
+ video_capturer_->Start(&screen_capturer_callback_);
// Run the message loop until the desktop is attached.
setup_run_loop_->Run();
@@ -586,7 +588,7 @@ TEST_F(IpcDesktopEnvironmentTest, InjectMouseEvent) {
// Start the input injector and screen capturer.
input_injector_->Start(clipboard_stub.PassAs<protocol::ClipboardStub>());
- video_capturer_->Start(&screen_capturer_delegate_);
+ video_capturer_->Start(&screen_capturer_callback_);
// Run the message loop until the desktop is attached.
setup_run_loop_->Run();
« no previous file with comments | « remoting/host/desktop_session_win.cc ('k') | remoting/host/ipc_video_frame_capturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698