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

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

Issue 6594138: Block event processing on host/client until the client has authenticated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix merge conflict Created 9 years, 9 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/connection_to_client.cc ('k') | remoting/protocol/connection_to_host.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_CONNECTION_TO_HOST_H_ 5 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_
6 #define REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ 6 #define REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/ref_counted.h" 10 #include "base/ref_counted.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 virtual void OnStateChange(JingleClient* client, JingleClient::State state); 78 virtual void OnStateChange(JingleClient* client, JingleClient::State state);
79 79
80 // Callback for chromotocol SessionManager. 80 // Callback for chromotocol SessionManager.
81 void OnNewSession( 81 void OnNewSession(
82 Session* connection, 82 Session* connection,
83 SessionManager::IncomingSessionResponse* response); 83 SessionManager::IncomingSessionResponse* response);
84 84
85 // Callback for chromotocol Session. 85 // Callback for chromotocol Session.
86 void OnSessionStateChange(Session::State state); 86 void OnSessionStateChange(Session::State state);
87 87
88 // Called when the host accepts the client authentication.
89 void OnClientAuthenticated();
90
88 private: 91 private:
89 // The message loop for the jingle thread this object works on. 92 // The message loop for the jingle thread this object works on.
90 MessageLoop* message_loop(); 93 MessageLoop* message_loop();
91 94
92 // Called on the jingle thread after we've successfully to XMPP server. Starts 95 // Called on the jingle thread after we've successfully to XMPP server. Starts
93 // P2P connection to the host. 96 // P2P connection to the host.
94 void InitSession(); 97 void InitSession();
95 98
96 // Callback for |video_reader_|. 99 // Callback for |video_reader_|.
97 void OnVideoPacket(VideoPacket* packet); 100 void OnVideoPacket(VideoPacket* packet);
98 101
99 // Used by Disconnect() to disconnect chromoting connection, stop chromoting 102 // Used by Disconnect() to disconnect chromoting connection, stop chromoting
100 // server, and then disconnect XMPP connection. 103 // server, and then disconnect XMPP connection.
101 void OnDisconnected(); 104 void OnDisconnected();
102 void OnServerClosed(); 105 void OnServerClosed();
103 106
107 // Initially false, this is set to true once the client has authenticated
108 // properly. When this is false, many messages to the host (like input events)
109 // will be suppressed.
110 bool client_authenticated_;
111
104 JingleThread* thread_; 112 JingleThread* thread_;
105 113
106 scoped_ptr<talk_base::NetworkManager> network_manager_; 114 scoped_ptr<talk_base::NetworkManager> network_manager_;
107 scoped_ptr<talk_base::PacketSocketFactory> socket_factory_; 115 scoped_ptr<talk_base::PacketSocketFactory> socket_factory_;
108 116
109 scoped_ptr<SignalStrategy> signal_strategy_; 117 scoped_ptr<SignalStrategy> signal_strategy_;
110 scoped_refptr<JingleClient> jingle_client_; 118 scoped_refptr<JingleClient> jingle_client_;
111 scoped_refptr<SessionManager> session_manager_; 119 scoped_refptr<SessionManager> session_manager_;
112 scoped_refptr<Session> session_; 120 scoped_refptr<Session> session_;
113 121
(...skipping 29 matching lines...) Expand all
143 private: 151 private:
144 DISALLOW_COPY_AND_ASSIGN(ConnectionToHost); 152 DISALLOW_COPY_AND_ASSIGN(ConnectionToHost);
145 }; 153 };
146 154
147 } // namespace protocol 155 } // namespace protocol
148 } // namespace remoting 156 } // namespace remoting
149 157
150 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::protocol::ConnectionToHost); 158 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::protocol::ConnectionToHost);
151 159
152 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ 160 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_
OLDNEW
« no previous file with comments | « remoting/protocol/connection_to_client.cc ('k') | remoting/protocol/connection_to_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698