| Index: remoting/protocol/input_filter.h
|
| diff --git a/remoting/protocol/input_filter.h b/remoting/protocol/input_filter.h
|
| index ba8b640e27c94fb49ba2b42015448e681998e3e0..1255637546897fd84e23c02232350e5a0a788020 100644
|
| --- a/remoting/protocol/input_filter.h
|
| +++ b/remoting/protocol/input_filter.h
|
| @@ -12,27 +12,35 @@
|
| namespace remoting {
|
| namespace protocol {
|
|
|
| -// Forwards input events to |input_stub|, iif |input_stub| is not NULL.
|
| +// Forwards input events to |input_stub|, if configured. Input forwarding may
|
| +// also 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);
|
| };
|
|
|