Chromium Code Reviews| 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); |
| }; |