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

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

Issue 296943003: Allow mouse-input to be enabled even if the plugin does not have keyboard focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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') | no next file » | 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 b9ec4e8598b27ad3963a8a27b28b80358381b8de..5bdebf39a49570db92f394dc84ee32837f6d07c1 100644
--- a/remoting/client/plugin/pepper_input_handler.cc
+++ b/remoting/client/plugin/pepper_input_handler.cc
@@ -23,6 +23,7 @@ PepperInputHandler::PepperInputHandler(
input_stub_(NULL),
callback_factory_(this),
has_focus_(false),
+ send_mouse_input_when_unfocused_(false),
mouse_lock_state_(MouseLockDisallowed),
wheel_delta_x_(0),
wheel_delta_y_(0),
@@ -74,7 +75,7 @@ bool PepperInputHandler::HandleInputEvent(const pp::InputEvent& event) {
case PP_INPUTEVENT_TYPE_MOUSEDOWN:
case PP_INPUTEVENT_TYPE_MOUSEUP: {
- if (!has_focus_)
+ if (!has_focus_ && !send_mouse_input_when_unfocused_)
return false;
pp::MouseInputEvent pp_mouse_event(event);
@@ -114,7 +115,7 @@ bool PepperInputHandler::HandleInputEvent(const pp::InputEvent& event) {
case PP_INPUTEVENT_TYPE_MOUSEMOVE:
case PP_INPUTEVENT_TYPE_MOUSEENTER:
case PP_INPUTEVENT_TYPE_MOUSELEAVE: {
- if (!has_focus_)
+ if (!has_focus_ && !send_mouse_input_when_unfocused_)
return false;
pp::MouseInputEvent pp_mouse_event(event);
@@ -135,7 +136,7 @@ bool PepperInputHandler::HandleInputEvent(const pp::InputEvent& event) {
}
case PP_INPUTEVENT_TYPE_WHEEL: {
- if (!has_focus_)
+ if (!has_focus_ && !send_mouse_input_when_unfocused_)
return false;
pp::WheelInputEvent pp_wheel_event(event);
« no previous file with comments | « remoting/client/plugin/pepper_input_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698