| OLD | NEW |
| 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 #ifndef REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ | 5 #ifndef REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ |
| 6 #define REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ | 6 #define REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "net/base/ip_endpoint.h" | 10 #include "net/base/ip_endpoint.h" |
| 11 #include "remoting/proto/internal.pb.h" | 11 #include "remoting/proto/internal.pb.h" |
| 12 #include "remoting/protocol/client_stub.h" | 12 #include "remoting/protocol/client_stub.h" |
| 13 #include "remoting/protocol/clipboard_stub.h" |
| 13 #include "remoting/protocol/connection_to_client.h" | 14 #include "remoting/protocol/connection_to_client.h" |
| 15 #include "remoting/protocol/host_event_stub.h" |
| 14 #include "remoting/protocol/host_stub.h" | 16 #include "remoting/protocol/host_stub.h" |
| 15 #include "remoting/protocol/input_stub.h" | 17 #include "remoting/protocol/input_stub.h" |
| 16 #include "remoting/protocol/session.h" | 18 #include "remoting/protocol/session.h" |
| 17 #include "remoting/protocol/video_stub.h" | 19 #include "remoting/protocol/video_stub.h" |
| 18 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
| 19 | 21 |
| 20 namespace remoting { | 22 namespace remoting { |
| 21 namespace protocol { | 23 namespace protocol { |
| 22 | 24 |
| 23 class MockConnectionToClient : public ConnectionToClient { | 25 class MockConnectionToClient : public ConnectionToClient { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 52 MOCK_METHOD4(OnRouteChange, void( | 54 MOCK_METHOD4(OnRouteChange, void( |
| 53 ConnectionToClient* connection, | 55 ConnectionToClient* connection, |
| 54 const std::string& channel_name, | 56 const std::string& channel_name, |
| 55 const net::IPEndPoint& remote_end_point, | 57 const net::IPEndPoint& remote_end_point, |
| 56 const net::IPEndPoint& local_end_point)); | 58 const net::IPEndPoint& local_end_point)); |
| 57 | 59 |
| 58 private: | 60 private: |
| 59 DISALLOW_COPY_AND_ASSIGN(MockConnectionToClientEventHandler); | 61 DISALLOW_COPY_AND_ASSIGN(MockConnectionToClientEventHandler); |
| 60 }; | 62 }; |
| 61 | 63 |
| 64 class MockClipboardStub : public ClipboardStub { |
| 65 public: |
| 66 MockClipboardStub(); |
| 67 virtual ~MockClipboardStub(); |
| 68 |
| 69 MOCK_METHOD1(InjectClipboardEvent, void(const ClipboardEvent& event)); |
| 70 |
| 71 private: |
| 72 DISALLOW_COPY_AND_ASSIGN(MockClipboardStub); |
| 73 }; |
| 74 |
| 62 class MockInputStub : public InputStub { | 75 class MockInputStub : public InputStub { |
| 63 public: | 76 public: |
| 64 MockInputStub(); | 77 MockInputStub(); |
| 65 virtual ~MockInputStub(); | 78 virtual ~MockInputStub(); |
| 66 | 79 |
| 67 MOCK_METHOD1(InjectKeyEvent, void(const KeyEvent& event)); | 80 MOCK_METHOD1(InjectKeyEvent, void(const KeyEvent& event)); |
| 68 MOCK_METHOD1(InjectMouseEvent, void(const MouseEvent& event)); | 81 MOCK_METHOD1(InjectMouseEvent, void(const MouseEvent& event)); |
| 69 | 82 |
| 70 private: | 83 private: |
| 71 DISALLOW_COPY_AND_ASSIGN(MockInputStub); | 84 DISALLOW_COPY_AND_ASSIGN(MockInputStub); |
| 72 }; | 85 }; |
| 73 | 86 |
| 87 class MockHostEventStub : public HostEventStub { |
| 88 public: |
| 89 MockHostEventStub(); |
| 90 virtual ~MockHostEventStub(); |
| 91 |
| 92 MOCK_METHOD1(InjectClipboardEvent, void(const ClipboardEvent& event)); |
| 93 MOCK_METHOD1(InjectKeyEvent, void(const KeyEvent& event)); |
| 94 MOCK_METHOD1(InjectMouseEvent, void(const MouseEvent& event)); |
| 95 |
| 96 private: |
| 97 DISALLOW_COPY_AND_ASSIGN(MockHostEventStub); |
| 98 }; |
| 99 |
| 74 class MockHostStub : public HostStub { | 100 class MockHostStub : public HostStub { |
| 75 public: | 101 public: |
| 76 MockHostStub(); | 102 MockHostStub(); |
| 77 virtual ~MockHostStub(); | 103 virtual ~MockHostStub(); |
| 78 | 104 |
| 79 private: | 105 private: |
| 80 DISALLOW_COPY_AND_ASSIGN(MockHostStub); | 106 DISALLOW_COPY_AND_ASSIGN(MockHostStub); |
| 81 }; | 107 }; |
| 82 | 108 |
| 83 class MockClientStub : public ClientStub { | 109 class MockClientStub : public ClientStub { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 MOCK_METHOD0(Close, void()); | 161 MOCK_METHOD0(Close, void()); |
| 136 | 162 |
| 137 private: | 163 private: |
| 138 DISALLOW_COPY_AND_ASSIGN(MockSession); | 164 DISALLOW_COPY_AND_ASSIGN(MockSession); |
| 139 }; | 165 }; |
| 140 | 166 |
| 141 } // namespace protocol | 167 } // namespace protocol |
| 142 } // namespace remoting | 168 } // namespace remoting |
| 143 | 169 |
| 144 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ | 170 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ |
| OLD | NEW |