Break out Chromoting plugin's cursor & mouse-lock handling.
commit1473701411796c934eb3a47d583e76ba87ac142b
authorwez <wez@chromium.org>
Mon, 24 Nov 2014 19:10:50 +0000 (24 11:10 -0800)
committerCommit bot <commit-bot@chromium.org>
Mon, 24 Nov 2014 19:11:53 +0000 (24 19:11 +0000)
treee810a3ba3d30cbcf35853e5752021503833c583d
parente4236151773b9387a3ef01e87627435a68577618
Break out Chromoting plugin's cursor & mouse-lock handling.

This CL breaks cursor & mouse-lock handling out of PepperInputHandler:
- PepperCursorSetter is added to set the native PPAPI cursor.
  Callers may provide an alternate stub to delegate to if the PPAPI cursor
  cannot be set; ChromotingInstance uses this for oversized cursor rendering.
- EmptyCursorFilter is added to normalize transparent cursors to (0x0).
- PepperMouseLocker is added, to handle mouse-lock mode.
  This hooks into the cursor pipeline in order to detect (non)empty cursor
  shapes and engage mouse-lock accordingly, and to control whether any cursor
  is rendered locally.
- ChromotingInstance is updated to handle rceived cursors via these helpers,
  so that it need only directly handle delegated oversized cursors itself.

BUG=138108, 429322

Review URL: https://codereview.chromium.org/695583005

Cr-Commit-Position: refs/heads/master@{#305463}
16 files changed:
remoting/client/plugin/chromoting_instance.cc
remoting/client/plugin/chromoting_instance.h
remoting/client/plugin/chromoting_plugin_unittest.cc [deleted file]
remoting/client/plugin/empty_cursor_filter.cc [new file with mode: 0644]
remoting/client/plugin/empty_cursor_filter.h [new file with mode: 0644]
remoting/client/plugin/empty_cursor_filter_unittest.cc [new file with mode: 0644]
remoting/client/plugin/pepper_cursor_setter.cc [new file with mode: 0644]
remoting/client/plugin/pepper_cursor_setter.h [new file with mode: 0644]
remoting/client/plugin/pepper_input_handler.cc
remoting/client/plugin/pepper_input_handler.h
remoting/client/plugin/pepper_mouse_locker.cc [new file with mode: 0644]
remoting/client/plugin/pepper_mouse_locker.h [new file with mode: 0644]
remoting/protocol/protocol_mock_objects.cc
remoting/protocol/protocol_mock_objects.h
remoting/remoting_srcs.gypi
remoting/remoting_test.gypi