Chromium Code Reviews| Index: remoting/protocol/input_filter.h |
| diff --git a/remoting/protocol/input_filter.h b/remoting/protocol/input_filter.h |
| index ba8b640e27c94fb49ba2b42015448e681998e3e0..71f765580a375331ec70554edae5b77c9dd31b85 100644 |
| --- a/remoting/protocol/input_filter.h |
| +++ b/remoting/protocol/input_filter.h |
| @@ -13,26 +13,34 @@ namespace remoting { |
| namespace protocol { |
| // Forwards input events to |input_stub|, iif |input_stub| is not NULL. |
|
simonmorris
2012/08/20 16:37:18
"iff" doesn't apply now.
Is it feasible to requir
Wez
2012/08/20 19:58:21
Done.
|
| +// Input forwarding may be disabled independently of the |input_stub| being |
| +// set. InputFilters initially have input forwarding enabled. |
| class InputFilter : public InputStub { |
| public: |
| InputFilter(); |
| explicit InputFilter(InputStub* input_stub); |
| virtual ~InputFilter(); |
| - // Return the InputStub that events will be forwarded to. |
| - InputStub* input_stub() { return input_stub_; } |
| - |
| // Set the InputStub that events will be forwarded to. |
| void set_input_stub(InputStub* input_stub) { |
| input_stub_ = input_stub; |
| } |
| + // Enable/disable routing of events to the InputStub. |
| + void set_enabled(bool enabled) { |
| + enabled_ = enabled; |
| + } |
| + bool enabled() const { |
| + return enabled_; |
| + } |
| + |
| // InputStub interface. |
| virtual void InjectKeyEvent(const KeyEvent& event) OVERRIDE; |
| virtual void InjectMouseEvent(const MouseEvent& event) OVERRIDE; |
| private: |
| InputStub* input_stub_; |
| + bool enabled_; |
| DISALLOW_COPY_AND_ASSIGN(InputFilter); |
| }; |