| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "remoting/host/ipc_desktop_environment.h" | 5 #include "remoting/host/ipc_desktop_environment.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #include "remoting/host/desktop_session.h" | 33 #include "remoting/host/desktop_session.h" |
| 34 #include "remoting/host/desktop_session_connector.h" | 34 #include "remoting/host/desktop_session_connector.h" |
| 35 #include "remoting/host/desktop_session_proxy.h" | 35 #include "remoting/host/desktop_session_proxy.h" |
| 36 #include "remoting/host/fake_mouse_cursor_monitor.h" | 36 #include "remoting/host/fake_mouse_cursor_monitor.h" |
| 37 #include "remoting/host/host_mock_objects.h" | 37 #include "remoting/host/host_mock_objects.h" |
| 38 #include "remoting/protocol/fake_desktop_capturer.h" | 38 #include "remoting/protocol/fake_desktop_capturer.h" |
| 39 #include "remoting/protocol/protocol_mock_objects.h" | 39 #include "remoting/protocol/protocol_mock_objects.h" |
| 40 #include "remoting/protocol/test_event_matchers.h" | 40 #include "remoting/protocol/test_event_matchers.h" |
| 41 #include "testing/gmock/include/gmock/gmock.h" | 41 #include "testing/gmock/include/gmock/gmock.h" |
| 42 #include "testing/gtest/include/gtest/gtest.h" | 42 #include "testing/gtest/include/gtest/gtest.h" |
| 43 #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" |
| 43 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" | 44 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" |
| 44 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" | 45 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" |
| 45 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" | |
| 46 | 46 |
| 47 using testing::_; | 47 using testing::_; |
| 48 using testing::AnyNumber; | 48 using testing::AnyNumber; |
| 49 using testing::AtLeast; | 49 using testing::AtLeast; |
| 50 using testing::AtMost; | 50 using testing::AtMost; |
| 51 using testing::DeleteArg; | 51 using testing::DeleteArg; |
| 52 using testing::DoAll; | 52 using testing::DoAll; |
| 53 using testing::InSequence; | 53 using testing::InSequence; |
| 54 using testing::Return; | 54 using testing::Return; |
| 55 using testing::ReturnRef; | 55 using testing::ReturnRef; |
| 56 | 56 |
| 57 namespace remoting { | 57 namespace remoting { |
| 58 | 58 |
| 59 using protocol::test::EqualsTouchEvent; | 59 using protocol::test::EqualsTouchEvent; |
| 60 using protocol::test::EqualsTouchEventTypeAndId; | 60 using protocol::test::EqualsTouchEventTypeAndId; |
| 61 | 61 |
| 62 namespace { | 62 namespace { |
| 63 | 63 |
| 64 class MockScreenCapturerCallback : public webrtc::ScreenCapturer::Callback { | 64 class MockScreenCapturerCallback : public webrtc::DesktopCapturer::Callback { |
| 65 public: | 65 public: |
| 66 MockScreenCapturerCallback() {} | 66 MockScreenCapturerCallback() {} |
| 67 virtual ~MockScreenCapturerCallback() {} | 67 virtual ~MockScreenCapturerCallback() {} |
| 68 | 68 |
| 69 MOCK_METHOD2(OnCaptureResultPtr, | 69 MOCK_METHOD2(OnCaptureResultPtr, |
| 70 void(webrtc::DesktopCapturer::Result result, | 70 void(webrtc::DesktopCapturer::Result result, |
| 71 std::unique_ptr<webrtc::DesktopFrame>* frame)); | 71 std::unique_ptr<webrtc::DesktopFrame>* frame)); |
| 72 void OnCaptureResult(webrtc::DesktopCapturer::Result result, | 72 void OnCaptureResult(webrtc::DesktopCapturer::Result result, |
| 73 std::unique_ptr<webrtc::DesktopFrame> frame) override { | 73 std::unique_ptr<webrtc::DesktopFrame> frame) override { |
| 74 OnCaptureResultPtr(result, &frame); | 74 OnCaptureResultPtr(result, &frame); |
| (...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 .WillOnce(InvokeWithoutArgs( | 725 .WillOnce(InvokeWithoutArgs( |
| 726 this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment)); | 726 this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment)); |
| 727 | 727 |
| 728 // Change the desktop resolution. | 728 // Change the desktop resolution. |
| 729 screen_controls_->SetScreenResolution(ScreenResolution( | 729 screen_controls_->SetScreenResolution(ScreenResolution( |
| 730 webrtc::DesktopSize(100, 100), | 730 webrtc::DesktopSize(100, 100), |
| 731 webrtc::DesktopVector(96, 96))); | 731 webrtc::DesktopVector(96, 96))); |
| 732 } | 732 } |
| 733 | 733 |
| 734 } // namespace remoting | 734 } // namespace remoting |
| OLD | NEW |