Chromium Code Reviews| Index: remoting/protocol/clipboard_filter.h |
| diff --git a/remoting/protocol/clipboard_filter.h b/remoting/protocol/clipboard_filter.h |
| index 5fbcda5a15b7d2813be0e2d26786974747a600a3..d29776c3d9a622daf3598e558a52588079648718 100644 |
| --- a/remoting/protocol/clipboard_filter.h |
| +++ b/remoting/protocol/clipboard_filter.h |
| @@ -13,20 +13,27 @@ namespace remoting { |
| namespace protocol { |
| // Forwards clipboard events to |clipboard_stub|, iff |clipboard_stub| is not |
| -// NULL. |
| +// NULL. Event forwarding may be disabled independently of the configured |
|
simonmorris
2012/08/20 16:37:18
"iff" doesn't apply now.
Is it feasible to requir
Wez
2012/08/20 19:58:21
We could certainly [D]CHECK() that the stub is non
|
| +// |clipboard_stub|. ClipboardFilters initially have event forwarding enabled. |
| class ClipboardFilter : public ClipboardStub { |
| public: |
| ClipboardFilter(); |
| + explicit ClipboardFilter(ClipboardStub* clipboard_stub); |
| virtual ~ClipboardFilter(); |
| // Set the ClipboardStub that events will be forwarded to. |
| void set_clipboard_stub(ClipboardStub* clipboard_stub); |
| + // Enable/disable forwarding of clipboard events to the ClipboardStub. |
| + void set_enabled(bool enabled) { enabled_ = enabled; } |
| + bool enabled() const { return enabled_; } |
| + |
| // ClipboardStub interface. |
| virtual void InjectClipboardEvent(const ClipboardEvent& event) OVERRIDE; |
| private: |
| ClipboardStub* clipboard_stub_; |
| + bool enabled_; |
| DISALLOW_COPY_AND_ASSIGN(ClipboardFilter); |
| }; |