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

Side by Side Diff: remoting/host/ipc_desktop_environment_unittest.cc

Issue 12594009: Converted LocalInputMonitor into a SessionController instance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/host_user_interface.cc ('k') | remoting/host/local_input_monitor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 70 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
71 71
72 MOCK_METHOD1(OnDesktopAttached, void(IPC::PlatformFileForTransit)); 72 MOCK_METHOD1(OnDesktopAttached, void(IPC::PlatformFileForTransit));
73 MOCK_METHOD1(OnChannelConnected, void(int32)); 73 MOCK_METHOD1(OnChannelConnected, void(int32));
74 MOCK_METHOD0(OnChannelError, void()); 74 MOCK_METHOD0(OnChannelError, void());
75 75
76 private: 76 private:
77 DISALLOW_COPY_AND_ASSIGN(MockDaemonListener); 77 DISALLOW_COPY_AND_ASSIGN(MockDaemonListener);
78 }; 78 };
79 79
80 class MockClientSessionControl : public ClientSessionControl {
81 public:
82 MockClientSessionControl() {}
83 virtual ~MockClientSessionControl() {}
84
85 MOCK_CONST_METHOD0(client_jid, const std::string&());
86 MOCK_METHOD0(DisconnectSession, void());
87 MOCK_METHOD1(OnLocalMouseMoved, void(const SkIPoint&));
88 MOCK_METHOD1(SetDisableInputs, void(bool));
89
90 private:
91 DISALLOW_COPY_AND_ASSIGN(MockClientSessionControl);
92 };
93
94 bool FakeDaemonSender::Send(IPC::Message* message) { 80 bool FakeDaemonSender::Send(IPC::Message* message) {
95 OnMessageReceived(*message); 81 OnMessageReceived(*message);
96 delete message; 82 delete message;
97 return true; 83 return true;
98 } 84 }
99 85
100 void FakeDaemonSender::OnMessageReceived(const IPC::Message& message) { 86 void FakeDaemonSender::OnMessageReceived(const IPC::Message& message) {
101 bool handled = true; 87 bool handled = true;
102 IPC_BEGIN_MESSAGE_MAP(FakeDaemonSender, message) 88 IPC_BEGIN_MESSAGE_MAP(FakeDaemonSender, message)
103 IPC_MESSAGE_HANDLER(ChromotingNetworkHostMsg_ConnectTerminal, 89 IPC_MESSAGE_HANDLER(ChromotingNetworkHostMsg_ConnectTerminal,
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 event.set_x(0); 656 event.set_x(0);
671 event.set_y(0); 657 event.set_y(0);
672 input_injector_->InjectMouseEvent(event); 658 input_injector_->InjectMouseEvent(event);
673 659
674 task_runner_ = NULL; 660 task_runner_ = NULL;
675 io_task_runner_ = NULL; 661 io_task_runner_ = NULL;
676 main_run_loop_.Run(); 662 main_run_loop_.Run();
677 } 663 }
678 664
679 } // namespace remoting 665 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/host_user_interface.cc ('k') | remoting/host/local_input_monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698