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

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: add missing source files 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..f8ecf5102be86a9b9dccf54258edd2e57a05a976 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,25 @@ 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;
+ // Enable the input channel to allow processing of input events.
+ // This should be set to true only after a trusted communication channel has
+ // been established.
+ void SetEnabled(bool enabled);
+
Wez 2011/03/04 12:09:38 Similar comments to ClientStub. :)
garykac 2011/03/04 20:28:02 Done.
+ // Is the input channel enabled?
+ // I.e., are we processing input events?
Wez 2011/03/04 12:09:38 As ClientStub.
garykac 2011/03/04 20:28:02 Done.
+ bool enabled();
+
private:
+ // Initially false, this controls whether input events should be processed.
+ bool enabled_;
+
DISALLOW_COPY_AND_ASSIGN(InputStub);
};

Powered by Google App Engine
This is Rietveld 408576698