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

Unified Diff: remoting/protocol/input_filter.cc

Issue 10860033: Allow input & clipboard filters to be disabled without NULLing target stub. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments and fix clipboard pipeline initialization. Created 8 years, 4 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
« no previous file with comments | « remoting/protocol/input_filter.h ('k') | remoting/protocol/input_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/input_filter.cc
diff --git a/remoting/protocol/input_filter.cc b/remoting/protocol/input_filter.cc
index d74939137ce58059c765d0b1565cfb1647e093ed..178fde771e3bded79b5b68bb76b2487bf09a96a4 100644
--- a/remoting/protocol/input_filter.cc
+++ b/remoting/protocol/input_filter.cc
@@ -7,22 +7,23 @@
namespace remoting {
namespace protocol {
-InputFilter::InputFilter() : input_stub_(NULL) {
+InputFilter::InputFilter() : input_stub_(NULL), enabled_(true) {
}
-InputFilter::InputFilter(InputStub* input_stub) : input_stub_(input_stub) {
+InputFilter::InputFilter(InputStub* input_stub)
+ : input_stub_(input_stub), enabled_(true) {
}
InputFilter::~InputFilter() {
}
void InputFilter::InjectKeyEvent(const KeyEvent& event) {
- if (input_stub_ != NULL)
+ if (enabled_ && input_stub_ != NULL)
input_stub_->InjectKeyEvent(event);
}
void InputFilter::InjectMouseEvent(const MouseEvent& event) {
- if (input_stub_ != NULL)
+ if (enabled_ && input_stub_ != NULL)
input_stub_->InjectMouseEvent(event);
}
« no previous file with comments | « remoting/protocol/input_filter.h ('k') | remoting/protocol/input_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698