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" |
14 #include "remoting/protocol/host_stub.h" | 15 #include "remoting/protocol/host_stub.h" |
15 #include "remoting/protocol/input_stub.h" | 16 #include "remoting/protocol/input_stub.h" |
16 #include "remoting/protocol/session.h" | 17 #include "remoting/protocol/session.h" |
17 #include "remoting/protocol/video_stub.h" | 18 #include "remoting/protocol/video_stub.h" |
18 #include "testing/gmock/include/gmock/gmock.h" | 19 #include "testing/gmock/include/gmock/gmock.h" |
19 | 20 |
20 namespace remoting { | 21 namespace remoting { |
21 namespace protocol { | 22 namespace protocol { |
22 | 23 |
(...skipping 29 matching lines...) Expand all Loading... | |
52 MOCK_METHOD4(OnRouteChange, void( | 53 MOCK_METHOD4(OnRouteChange, void( |
53 ConnectionToClient* connection, | 54 ConnectionToClient* connection, |
54 const std::string& channel_name, | 55 const std::string& channel_name, |
55 const net::IPEndPoint& remote_end_point, | 56 const net::IPEndPoint& remote_end_point, |
56 const net::IPEndPoint& local_end_point)); | 57 const net::IPEndPoint& local_end_point)); |
57 | 58 |
58 private: | 59 private: |
59 DISALLOW_COPY_AND_ASSIGN(MockConnectionToClientEventHandler); | 60 DISALLOW_COPY_AND_ASSIGN(MockConnectionToClientEventHandler); |
60 }; | 61 }; |
61 | 62 |
63 class MockClipboardStub : public ClipboardStub { | |
Wez
2012/03/15 01:14:44
nit: At this point we don't actually need a MockCl
simonmorris
2012/03/15 16:53:19
They're separate again now.
| |
64 public: | |
65 MockClipboardStub(); | |
66 virtual ~MockClipboardStub(); | |
67 | |
68 MOCK_METHOD1(InjectClipboardEvent, void(const ClipboardEvent& event)); | |
69 | |
70 private: | |
71 DISALLOW_COPY_AND_ASSIGN(MockClipboardStub); | |
72 }; | |
73 | |
62 class MockInputStub : public InputStub { | 74 class MockInputStub : public InputStub { |
63 public: | 75 public: |
64 MockInputStub(); | 76 MockInputStub(); |
65 virtual ~MockInputStub(); | 77 virtual ~MockInputStub(); |
66 | 78 |
79 // TODO(wez): Delete the next line when InputStub no longer inherits from | |
80 // ClipboardStub. | |
81 MOCK_METHOD1(InjectClipboardEvent, void(const ClipboardEvent&)); | |
67 MOCK_METHOD1(InjectKeyEvent, void(const KeyEvent& event)); | 82 MOCK_METHOD1(InjectKeyEvent, void(const KeyEvent& event)); |
68 MOCK_METHOD1(InjectMouseEvent, void(const MouseEvent& event)); | 83 MOCK_METHOD1(InjectMouseEvent, void(const MouseEvent& event)); |
69 | 84 |
70 private: | 85 private: |
71 DISALLOW_COPY_AND_ASSIGN(MockInputStub); | 86 DISALLOW_COPY_AND_ASSIGN(MockInputStub); |
72 }; | 87 }; |
73 | 88 |
74 class MockHostStub : public HostStub { | 89 class MockHostStub : public HostStub { |
75 public: | 90 public: |
76 MockHostStub(); | 91 MockHostStub(); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
135 MOCK_METHOD0(Close, void()); | 150 MOCK_METHOD0(Close, void()); |
136 | 151 |
137 private: | 152 private: |
138 DISALLOW_COPY_AND_ASSIGN(MockSession); | 153 DISALLOW_COPY_AND_ASSIGN(MockSession); |
139 }; | 154 }; |
140 | 155 |
141 } // namespace protocol | 156 } // namespace protocol |
142 } // namespace remoting | 157 } // namespace remoting |
143 | 158 |
144 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ | 159 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ |
OLD | NEW |