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

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: fix mock objects for unittests 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..09fed2df8c9dc2f623e06b6743278263fd77bf33 100644
--- a/remoting/protocol/input_stub.h
+++ b/remoting/protocol/input_stub.h
@@ -18,13 +18,29 @@ class MouseEvent;
class InputStub {
public:
- InputStub() {}
+ InputStub() : enable_(false) {}
virtual ~InputStub() {}
dmac 2011/03/04 01:36:27 same deal with other stubs
garykac 2011/03/04 05:33:24 Done.
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 SetEnable(bool enable) {
dmac 2011/03/04 01:36:27 same comment about enabled
garykac 2011/03/04 05:33:24 Done.
+ enable_ = enable;
+ }
+
+ // Is the input channel enabled?
+ // I.e., are we processing input events?
+ bool Enabled() {
+ return enable_;
+ }
+
private:
+ // Initially false, this controls whether input events should be processed.
+ bool enable_;
+
DISALLOW_COPY_AND_ASSIGN(InputStub);
};

Powered by Google App Engine
This is Rietveld 408576698