| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_HOST_HOST_MOCK_OBJECTS_H_ | 5 #ifndef REMOTING_HOST_HOST_MOCK_OBJECTS_H_ |
| 6 #define REMOTING_HOST_HOST_MOCK_OBJECTS_H_ | 6 #define REMOTING_HOST_HOST_MOCK_OBJECTS_H_ |
| 7 | 7 |
| 8 #include "remoting/host/access_verifier.h" | |
| 9 #include "remoting/host/capturer.h" | 8 #include "remoting/host/capturer.h" |
| 10 #include "remoting/host/curtain.h" | 9 #include "remoting/host/curtain.h" |
| 11 #include "remoting/host/chromoting_host_context.h" | 10 #include "remoting/host/chromoting_host_context.h" |
| 12 #include "remoting/host/client_session.h" | 11 #include "remoting/host/client_session.h" |
| 13 #include "remoting/host/continue_window.h" | 12 #include "remoting/host/continue_window.h" |
| 14 #include "remoting/host/disconnect_window.h" | 13 #include "remoting/host/disconnect_window.h" |
| 15 #include "remoting/host/event_executor.h" | 14 #include "remoting/host/event_executor.h" |
| 16 #include "remoting/host/local_input_monitor.h" | 15 #include "remoting/host/local_input_monitor.h" |
| 17 #include "remoting/host/user_authenticator.h" | 16 #include "remoting/host/user_authenticator.h" |
| 18 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 private: | 89 private: |
| 91 DISALLOW_COPY_AND_ASSIGN(MockChromotingHostContext); | 90 DISALLOW_COPY_AND_ASSIGN(MockChromotingHostContext); |
| 92 }; | 91 }; |
| 93 | 92 |
| 94 class MockClientSessionEventHandler : public ClientSession::EventHandler { | 93 class MockClientSessionEventHandler : public ClientSession::EventHandler { |
| 95 public: | 94 public: |
| 96 MockClientSessionEventHandler(); | 95 MockClientSessionEventHandler(); |
| 97 virtual ~MockClientSessionEventHandler(); | 96 virtual ~MockClientSessionEventHandler(); |
| 98 | 97 |
| 99 MOCK_METHOD1(OnSessionAuthenticated, void(ClientSession* client)); | 98 MOCK_METHOD1(OnSessionAuthenticated, void(ClientSession* client)); |
| 99 MOCK_METHOD1(OnSessionAuthenticationFailed, void(ClientSession* client)); |
| 100 MOCK_METHOD1(OnSessionClosed, void(ClientSession* client)); | 100 MOCK_METHOD1(OnSessionClosed, void(ClientSession* client)); |
| 101 MOCK_METHOD1(OnSessionFailed, void(ClientSession* client)); | 101 MOCK_METHOD1(OnSessionFailed, void(ClientSession* client)); |
| 102 MOCK_METHOD2(OnSessionSequenceNumber, void(ClientSession* client, | 102 MOCK_METHOD2(OnSessionSequenceNumber, void(ClientSession* client, |
| 103 int64 sequence_number)); | 103 int64 sequence_number)); |
| 104 private: | 104 private: |
| 105 DISALLOW_COPY_AND_ASSIGN(MockClientSessionEventHandler); | 105 DISALLOW_COPY_AND_ASSIGN(MockClientSessionEventHandler); |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 class MockEventExecutor : public EventExecutor { | 108 class MockEventExecutor : public EventExecutor { |
| 109 public: | 109 public: |
| (...skipping 12 matching lines...) Expand all Loading... |
| 122 MockUserAuthenticator(); | 122 MockUserAuthenticator(); |
| 123 virtual ~MockUserAuthenticator(); | 123 virtual ~MockUserAuthenticator(); |
| 124 | 124 |
| 125 MOCK_METHOD2(Authenticate, bool(const std::string& username, | 125 MOCK_METHOD2(Authenticate, bool(const std::string& username, |
| 126 const std::string& password)); | 126 const std::string& password)); |
| 127 | 127 |
| 128 private: | 128 private: |
| 129 DISALLOW_COPY_AND_ASSIGN(MockUserAuthenticator); | 129 DISALLOW_COPY_AND_ASSIGN(MockUserAuthenticator); |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 class MockAccessVerifier : public AccessVerifier { | |
| 133 public: | |
| 134 MockAccessVerifier(); | |
| 135 virtual ~MockAccessVerifier(); | |
| 136 | |
| 137 MOCK_METHOD2(VerifyPermissions, bool(const std::string& client_jid, | |
| 138 const std::string& token)); | |
| 139 | |
| 140 private: | |
| 141 DISALLOW_COPY_AND_ASSIGN(MockAccessVerifier); | |
| 142 }; | |
| 143 | |
| 144 } // namespace remoting | 132 } // namespace remoting |
| 145 | 133 |
| 146 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ | 134 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ |
| OLD | NEW |