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 <stdint.h> |
| 6 |
5 #include "base/bind.h" | 7 #include "base/bind.h" |
6 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
7 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/macros.h" |
8 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
11 #include "base/process/process.h" | 14 #include "base/process/process.h" |
12 #include "base/process/process_handle.h" | 15 #include "base/process/process_handle.h" |
13 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
| 17 #include "build/build_config.h" |
14 #include "ipc/ipc_channel.h" | 18 #include "ipc/ipc_channel.h" |
15 #include "ipc/ipc_channel_proxy.h" | 19 #include "ipc/ipc_channel_proxy.h" |
16 #include "ipc/ipc_listener.h" | 20 #include "ipc/ipc_listener.h" |
17 #include "ipc/ipc_message.h" | 21 #include "ipc/ipc_message.h" |
18 #include "ipc/ipc_platform_file.h" | 22 #include "ipc/ipc_platform_file.h" |
19 #include "remoting/base/auto_thread.h" | 23 #include "remoting/base/auto_thread.h" |
20 #include "remoting/base/auto_thread_task_runner.h" | 24 #include "remoting/base/auto_thread_task_runner.h" |
21 #include "remoting/base/constants.h" | 25 #include "remoting/base/constants.h" |
22 #include "remoting/host/chromoting_messages.h" | 26 #include "remoting/host/chromoting_messages.h" |
23 #include "remoting/host/desktop_process.h" | 27 #include "remoting/host/desktop_process.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 78 |
75 // Receives messages sent from the desktop process to the daemon. | 79 // Receives messages sent from the desktop process to the daemon. |
76 class MockDaemonListener : public IPC::Listener { | 80 class MockDaemonListener : public IPC::Listener { |
77 public: | 81 public: |
78 MockDaemonListener() {} | 82 MockDaemonListener() {} |
79 ~MockDaemonListener() override {} | 83 ~MockDaemonListener() override {} |
80 | 84 |
81 bool OnMessageReceived(const IPC::Message& message) override; | 85 bool OnMessageReceived(const IPC::Message& message) override; |
82 | 86 |
83 MOCK_METHOD1(OnDesktopAttached, void(IPC::PlatformFileForTransit)); | 87 MOCK_METHOD1(OnDesktopAttached, void(IPC::PlatformFileForTransit)); |
84 MOCK_METHOD1(OnChannelConnected, void(int32)); | 88 MOCK_METHOD1(OnChannelConnected, void(int32_t)); |
85 MOCK_METHOD0(OnChannelError, void()); | 89 MOCK_METHOD0(OnChannelError, void()); |
86 | 90 |
87 private: | 91 private: |
88 DISALLOW_COPY_AND_ASSIGN(MockDaemonListener); | 92 DISALLOW_COPY_AND_ASSIGN(MockDaemonListener); |
89 }; | 93 }; |
90 | 94 |
91 bool FakeDaemonSender::Send(IPC::Message* message) { | 95 bool FakeDaemonSender::Send(IPC::Message* message) { |
92 OnMessageReceived(*message); | 96 OnMessageReceived(*message); |
93 delete message; | 97 delete message; |
94 return true; | 98 return true; |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 .WillOnce(InvokeWithoutArgs( | 738 .WillOnce(InvokeWithoutArgs( |
735 this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment)); | 739 this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment)); |
736 | 740 |
737 // Change the desktop resolution. | 741 // Change the desktop resolution. |
738 screen_controls_->SetScreenResolution(ScreenResolution( | 742 screen_controls_->SetScreenResolution(ScreenResolution( |
739 webrtc::DesktopSize(100, 100), | 743 webrtc::DesktopSize(100, 100), |
740 webrtc::DesktopVector(96, 96))); | 744 webrtc::DesktopVector(96, 96))); |
741 } | 745 } |
742 | 746 |
743 } // namespace remoting | 747 } // namespace remoting |
OLD | NEW |