OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef REMOTING_TEST_APP_REMOTING_CONNECTED_CLIENT_FIXTURE_H_ | 5 #ifndef REMOTING_TEST_APP_REMOTING_CONNECTED_CLIENT_FIXTURE_H_ |
6 #define REMOTING_TEST_APP_REMOTING_CONNECTED_CLIENT_FIXTURE_H_ | 6 #define REMOTING_TEST_APP_REMOTING_CONNECTED_CLIENT_FIXTURE_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/callback.h" | 11 #include "base/callback.h" |
11 #include "base/macros.h" | 12 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/threading/thread_checker.h" | 14 #include "base/threading/thread_checker.h" |
15 #include "remoting/test/remote_connection_observer.h" | 15 #include "remoting/test/remote_connection_observer.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 namespace base { | 18 namespace base { |
19 class RunLoop; | 19 class RunLoop; |
20 class Timer; | 20 class Timer; |
21 } | 21 } |
22 | 22 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // RemoteConnectionObserver interface. | 56 // RemoteConnectionObserver interface. |
57 void HostMessageReceived(const protocol::ExtensionMessage& message) override; | 57 void HostMessageReceived(const protocol::ExtensionMessage& message) override; |
58 | 58 |
59 // Handles messages from the host. | 59 // Handles messages from the host. |
60 void HandleOnHostMessage(const remoting::protocol::ExtensionMessage& message); | 60 void HandleOnHostMessage(const remoting::protocol::ExtensionMessage& message); |
61 | 61 |
62 // Contains the details for the application being tested. | 62 // Contains the details for the application being tested. |
63 const RemoteApplicationDetails& application_details_; | 63 const RemoteApplicationDetails& application_details_; |
64 | 64 |
65 // Used to run the thread's message loop. | 65 // Used to run the thread's message loop. |
66 scoped_ptr<base::RunLoop> run_loop_; | 66 std::unique_ptr<base::RunLoop> run_loop_; |
67 | 67 |
68 // Used for setting timeouts and delays. | 68 // Used for setting timeouts and delays. |
69 scoped_ptr<base::Timer> timer_; | 69 std::unique_ptr<base::Timer> timer_; |
70 | 70 |
71 // Used to ensure RemoteConnectionObserver methods are called on the same | 71 // Used to ensure RemoteConnectionObserver methods are called on the same |
72 // thread. | 72 // thread. |
73 base::ThreadChecker thread_checker_; | 73 base::ThreadChecker thread_checker_; |
74 | 74 |
75 // Creates and manages the connection to the remote host. | 75 // Creates and manages the connection to the remote host. |
76 scoped_ptr<AppRemotingConnectionHelper> connection_helper_; | 76 std::unique_ptr<AppRemotingConnectionHelper> connection_helper_; |
77 | 77 |
78 // Called when an ExtensionMessage is received from the host. | 78 // Called when an ExtensionMessage is received from the host. |
79 HostMessageReceivedCallback host_message_received_callback_; | 79 HostMessageReceivedCallback host_message_received_callback_; |
80 | 80 |
81 DISALLOW_COPY_AND_ASSIGN(AppRemotingConnectedClientFixture); | 81 DISALLOW_COPY_AND_ASSIGN(AppRemotingConnectedClientFixture); |
82 }; | 82 }; |
83 | 83 |
84 } // namespace test | 84 } // namespace test |
85 } // namespace remoting | 85 } // namespace remoting |
86 | 86 |
87 #endif // REMOTING_TEST_APP_REMOTING_CONNECTED_CLIENT_FIXTURE_H_ | 87 #endif // REMOTING_TEST_APP_REMOTING_CONNECTED_CLIENT_FIXTURE_H_ |
OLD | NEW |