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

Unified Diff: remoting/client/plugin/pepper_input_handler.cc

Issue 292103004: Enable keyboard filters in PNaCl client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/client/plugin/pepper_input_handler.h ('k') | remoting/remoting_client.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/pepper_input_handler.cc
diff --git a/remoting/client/plugin/pepper_input_handler.cc b/remoting/client/plugin/pepper_input_handler.cc
index 60a2746b8cd0fd2d1db7bb4b2d8623eba1e88f41..b9ec4e8598b27ad3963a8a27b28b80358381b8de 100644
--- a/remoting/client/plugin/pepper_input_handler.cc
+++ b/remoting/client/plugin/pepper_input_handler.cc
@@ -17,11 +17,10 @@
namespace remoting {
PepperInputHandler::PepperInputHandler(
- pp::Instance* instance,
- protocol::InputStub* input_stub)
+ pp::Instance* instance)
: pp::MouseLock(instance),
instance_(instance),
- input_stub_(input_stub),
+ input_stub_(NULL),
callback_factory_(this),
has_focus_(false),
mouse_lock_state_(MouseLockDisallowed),
@@ -31,8 +30,7 @@ PepperInputHandler::PepperInputHandler(
wheel_ticks_y_(0) {
}
-PepperInputHandler::~PepperInputHandler() {
-}
+PepperInputHandler::~PepperInputHandler() {}
// Helper function to get the USB key code using the Dev InputEvent interface.
uint32_t GetUsbKeyCode(pp::KeyboardInputEvent pp_key_event) {
@@ -69,7 +67,8 @@ bool PepperInputHandler::HandleInputEvent(const pp::InputEvent& event) {
key_event.set_pressed(event.GetType() == PP_INPUTEVENT_TYPE_KEYDOWN);
key_event.set_lock_states(lock_states);
- input_stub_->InjectKeyEvent(key_event);
+ if (input_stub_)
+ input_stub_->InjectKeyEvent(key_event);
return true;
}
@@ -106,7 +105,8 @@ bool PepperInputHandler::HandleInputEvent(const pp::InputEvent& event) {
mouse_event.set_delta_y(delta.y());
}
- input_stub_->InjectMouseEvent(mouse_event);
+ if (input_stub_)
+ input_stub_->InjectMouseEvent(mouse_event);
}
return true;
}
@@ -129,7 +129,8 @@ bool PepperInputHandler::HandleInputEvent(const pp::InputEvent& event) {
mouse_event.set_delta_y(delta.y());
}
- input_stub_->InjectMouseEvent(mouse_event);
+ if (input_stub_)
+ input_stub_->InjectMouseEvent(mouse_event);
return true;
}
@@ -175,7 +176,8 @@ bool PepperInputHandler::HandleInputEvent(const pp::InputEvent& event) {
mouse_event.set_wheel_ticks_x(ticks_x);
mouse_event.set_wheel_ticks_y(ticks_y);
- input_stub_->InjectMouseEvent(mouse_event);
+ if (input_stub_)
+ input_stub_->InjectMouseEvent(mouse_event);
}
return true;
}
« no previous file with comments | « remoting/client/plugin/pepper_input_handler.h ('k') | remoting/remoting_client.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698