| 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;
|
| }
|
|
|