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

Unified 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: review comments Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/connection_to_host.h
diff --git a/remoting/protocol/connection_to_host.h b/remoting/protocol/connection_to_host.h
index 0869a7b953aa7e6e429b1967365a2ee1a33ec8ce..708270bf45915370a3f6a6322deb50e78d44fa95 100644
--- a/remoting/protocol/connection_to_host.h
+++ b/remoting/protocol/connection_to_host.h
@@ -80,6 +80,9 @@ class ConnectionToHost : public JingleClient::Callback {
// Callback for chromotocol Session.
void OnSessionStateChange(Session::State state);
+ // Called when the host accepts the client authentication.
+ void OnClientAuthenticated();
+
private:
// The message loop for the jingle thread this object works on.
MessageLoop* message_loop();
@@ -96,6 +99,11 @@ class ConnectionToHost : public JingleClient::Callback {
void OnDisconnected();
void OnServerClosed();
+ // Initially false, this is set to true once the client has authenticated
+ // properly. When this is false, many messages to the host (like input events)
+ // will be suppressed.
+ bool client_authenticated_;
+
JingleThread* thread_;
scoped_ptr<SignalStrategy> signal_strategy_;

Powered by Google App Engine
This is Rietveld 408576698