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

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

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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
« no previous file with comments | « remoting/host/local_input_monitor_mac.mm ('k') | remoting/host/local_input_monitor_win.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/local_input_monitor.h"
6
7 #include <memory>
8
5 #include "base/bind.h" 9 #include "base/bind.h"
6 #include "base/memory/scoped_ptr.h"
7 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
8 #include "base/run_loop.h" 11 #include "base/run_loop.h"
9 #include "build/build_config.h" 12 #include "build/build_config.h"
10 #include "remoting/base/auto_thread_task_runner.h" 13 #include "remoting/base/auto_thread_task_runner.h"
11 #include "remoting/host/client_session_control.h" 14 #include "remoting/host/client_session_control.h"
12 #include "remoting/host/host_mock_objects.h" 15 #include "remoting/host/host_mock_objects.h"
13 #include "remoting/host/local_input_monitor.h"
14 #include "remoting/protocol/protocol_mock_objects.h" 16 #include "remoting/protocol/protocol_mock_objects.h"
15 #include "testing/gmock/include/gmock/gmock.h" 17 #include "testing/gmock/include/gmock/gmock.h"
16 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
17 19
18 namespace remoting { 20 namespace remoting {
19 21
20 using testing::_; 22 using testing::_;
21 using testing::AnyNumber; 23 using testing::AnyNumber;
22 using testing::ReturnRef; 24 using testing::ReturnRef;
23 25
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 .Times(AnyNumber()) 71 .Times(AnyNumber())
70 .WillRepeatedly(ReturnRef(client_jid_)); 72 .WillRepeatedly(ReturnRef(client_jid_));
71 EXPECT_CALL(client_session_control_, DisconnectSession(_)) 73 EXPECT_CALL(client_session_control_, DisconnectSession(_))
72 .Times(AnyNumber()); 74 .Times(AnyNumber());
73 EXPECT_CALL(client_session_control_, OnLocalMouseMoved(_)) 75 EXPECT_CALL(client_session_control_, OnLocalMouseMoved(_))
74 .Times(AnyNumber()); 76 .Times(AnyNumber());
75 EXPECT_CALL(client_session_control_, SetDisableInputs(_)) 77 EXPECT_CALL(client_session_control_, SetDisableInputs(_))
76 .Times(0); 78 .Times(0);
77 79
78 { 80 {
79 scoped_ptr<LocalInputMonitor> local_input_monitor = 81 std::unique_ptr<LocalInputMonitor> local_input_monitor =
80 LocalInputMonitor::Create(task_runner_, 82 LocalInputMonitor::Create(task_runner_, task_runner_, task_runner_,
81 task_runner_,
82 task_runner_,
83 client_session_control_factory_.GetWeakPtr()); 83 client_session_control_factory_.GetWeakPtr());
84 task_runner_ = nullptr; 84 task_runner_ = nullptr;
85 } 85 }
86 86
87 run_loop_.Run(); 87 run_loop_.Run();
88 } 88 }
89 89
90 } // namespace remoting 90 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/local_input_monitor_mac.mm ('k') | remoting/host/local_input_monitor_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698