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

Unified Diff: remoting/protocol/input_stub.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/input_stub.h
diff --git a/remoting/protocol/input_stub.h b/remoting/protocol/input_stub.h
index 8b89c7a2f5c8f1f153bfc0ee49dfcba207a18dda..8c80d16476f0f945e56287f8bfdaf540cc9c1d68 100644
--- a/remoting/protocol/input_stub.h
+++ b/remoting/protocol/input_stub.h
@@ -8,6 +8,8 @@
#ifndef REMOTING_PROTOCOL_INPUT_STUB_H_
#define REMOTING_PROTOCOL_INPUT_STUB_H_
+#include "base/basictypes.h"
+
class Task;
namespace remoting {
@@ -18,13 +20,26 @@ class MouseEvent;
class InputStub {
public:
- InputStub() {}
- virtual ~InputStub() {}
+ InputStub();
+ virtual ~InputStub();
virtual void InjectKeyEvent(const KeyEvent* event, Task* done) = 0;
virtual void InjectMouseEvent(const MouseEvent* event, Task* done) = 0;
+ // Called when the client has authenticated with the host to enable the
+ // input event channel.
+ // Before this is called, all input event will be ignored.
+ void OnAuthenticated();
+
+ // Has the client successfully authenticated with the host?
+ // I.e., should we be processing input events?
+ bool authenticated();
+
private:
+ // Initially false, this records whether the client has authenticated with
+ // the host.
+ bool authenticated_;
+
DISALLOW_COPY_AND_ASSIGN(InputStub);
};

Powered by Google App Engine
This is Rietveld 408576698