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

Side by Side Diff: remoting/protocol/protocol_mock_objects.h

Issue 8046018: Parse termination reason and propagate the error to the Session interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « remoting/protocol/pepper_session.cc ('k') | remoting/protocol/session.h » ('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) 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_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 "remoting/proto/internal.pb.h" 8 #include "remoting/proto/internal.pb.h"
9 #include "remoting/protocol/client_stub.h" 9 #include "remoting/protocol/client_stub.h"
10 #include "remoting/protocol/connection_to_client.h" 10 #include "remoting/protocol/connection_to_client.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 private: 102 private:
103 DISALLOW_COPY_AND_ASSIGN(MockVideoStub); 103 DISALLOW_COPY_AND_ASSIGN(MockVideoStub);
104 }; 104 };
105 105
106 class MockSession : public Session { 106 class MockSession : public Session {
107 public: 107 public:
108 MockSession(); 108 MockSession();
109 virtual ~MockSession(); 109 virtual ~MockSession();
110 110
111 MOCK_METHOD1(SetStateChangeCallback, void(StateChangeCallback* callback)); 111 MOCK_METHOD1(SetStateChangeCallback, void(StateChangeCallback* callback));
112 MOCK_METHOD0(error, Session::Error());
112 MOCK_METHOD2(CreateStreamChannel, void( 113 MOCK_METHOD2(CreateStreamChannel, void(
113 const std::string& name, const StreamChannelCallback& callback)); 114 const std::string& name, const StreamChannelCallback& callback));
114 MOCK_METHOD2(CreateDatagramChannel, void( 115 MOCK_METHOD2(CreateDatagramChannel, void(
115 const std::string& name, const DatagramChannelCallback& callback)); 116 const std::string& name, const DatagramChannelCallback& callback));
116 MOCK_METHOD0(control_channel, net::Socket*()); 117 MOCK_METHOD0(control_channel, net::Socket*());
117 MOCK_METHOD0(event_channel, net::Socket*()); 118 MOCK_METHOD0(event_channel, net::Socket*());
118 MOCK_METHOD0(video_channel, net::Socket*()); 119 MOCK_METHOD0(video_channel, net::Socket*());
119 MOCK_METHOD0(video_rtp_channel, net::Socket*()); 120 MOCK_METHOD0(video_rtp_channel, net::Socket*());
120 MOCK_METHOD0(video_rtcp_channel, net::Socket*()); 121 MOCK_METHOD0(video_rtcp_channel, net::Socket*());
121 MOCK_METHOD0(jid, const std::string&()); 122 MOCK_METHOD0(jid, const std::string&());
122 MOCK_METHOD0(candidate_config, const CandidateSessionConfig*()); 123 MOCK_METHOD0(candidate_config, const CandidateSessionConfig*());
123 MOCK_METHOD0(config, const SessionConfig&()); 124 MOCK_METHOD0(config, const SessionConfig&());
124 MOCK_METHOD1(set_config, void(const SessionConfig& config)); 125 MOCK_METHOD1(set_config, void(const SessionConfig& config));
125 MOCK_METHOD0(initiator_token, const std::string&()); 126 MOCK_METHOD0(initiator_token, const std::string&());
126 MOCK_METHOD1(set_initiator_token, void(const std::string& initiator_token)); 127 MOCK_METHOD1(set_initiator_token, void(const std::string& initiator_token));
127 MOCK_METHOD0(receiver_token, const std::string&()); 128 MOCK_METHOD0(receiver_token, const std::string&());
128 MOCK_METHOD1(set_receiver_token, void(const std::string& receiver_token)); 129 MOCK_METHOD1(set_receiver_token, void(const std::string& receiver_token));
129 MOCK_METHOD1(set_shared_secret, void(const std::string& secret)); 130 MOCK_METHOD1(set_shared_secret, void(const std::string& secret));
130 MOCK_METHOD0(shared_secret, const std::string&()); 131 MOCK_METHOD0(shared_secret, const std::string&());
131 MOCK_METHOD0(Close, void()); 132 MOCK_METHOD0(Close, void());
132 133
133 private: 134 private:
134 DISALLOW_COPY_AND_ASSIGN(MockSession); 135 DISALLOW_COPY_AND_ASSIGN(MockSession);
135 }; 136 };
136 137
137 } // namespace protocol 138 } // namespace protocol
138 } // namespace remoting 139 } // namespace remoting
139 140
140 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ 141 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_
OLDNEW
« no previous file with comments | « remoting/protocol/pepper_session.cc ('k') | remoting/protocol/session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698