Skip to content

Commit

Permalink
Prevent client plugin from triggering IME.
Browse files Browse the repository at this point in the history
We prefer that the user interact with an IME at the host, so that they get full integration with applications running there. The client must therefore faithfully reproduce keyboard input to the client, without client-side IME.

BUG=401371

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

Cr-Commit-Position: refs/heads/master@{#288776}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288776 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
wez@chromium.org committed Aug 11, 2014
1 parent 52ab58f commit ef8e7b7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions remoting/client/plugin/chromoting_instance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ ChromotingInstance::ChromotingInstance(PP_Instance pp_instance)
input_tracker_(&mouse_input_filter_),
key_mapper_(&input_tracker_),
input_handler_(this),
text_input_controller_(this),
use_async_pin_dialog_(false),
use_media_source_rendering_(false),
delegate_large_cursors_(false),
Expand All @@ -237,9 +238,13 @@ ChromotingInstance::ChromotingInstance(PP_Instance pp_instance)
mount("", "/usr", "memfs", 0, "");
#endif

// Register for mouse, wheel and keyboard events.
RequestInputEvents(PP_INPUTEVENT_CLASS_MOUSE | PP_INPUTEVENT_CLASS_WHEEL);
RequestFilteringInputEvents(PP_INPUTEVENT_CLASS_KEYBOARD);

// Disable the client-side IME in Chrome.
text_input_controller_.SetTextInputType(PP_TEXTINPUT_TYPE_NONE);

// Resister this instance to handle debug log messsages.
RegisterLoggingInstance();

Expand Down
4 changes: 4 additions & 0 deletions remoting/client/plugin/chromoting_instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "ppapi/c/pp_rect.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/cpp/instance.h"
#include "ppapi/cpp/text_input_controller.h"
#include "ppapi/cpp/var.h"
#include "remoting/client/client_context.h"
#include "remoting/client/client_user_interface.h"
Expand Down Expand Up @@ -276,6 +277,9 @@ class ChromotingInstance :
scoped_ptr<protocol::InputFilter> normalizing_input_filter_;
PepperInputHandler input_handler_;

// Used to control text input settings, such as whether to show the IME.
pp::TextInputController text_input_controller_;

// PIN Fetcher.
bool use_async_pin_dialog_;
protocol::SecretFetchedCallback secret_fetched_callback_;
Expand Down

0 comments on commit ef8e7b7

Please sign in to comment.