diff options
author | kochi@chromium.org <kochi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-08 07:47:34 +0000 |
---|---|---|
committer | kochi@chromium.org <kochi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-08 07:47:34 +0000 |
commit | 65427246e1e92d969593c092aaadbeeca700ea96 (patch) | |
tree | 77770edacb5ab2a2eb6d8ee134c017259e54661e /ppapi | |
parent | de97f62a5c1cdeb60e976ae95e3ee43e7bbccf83 (diff) | |
download | chromium_src-65427246e1e92d969593c092aaadbeeca700ea96.zip chromium_src-65427246e1e92d969593c092aaadbeeca700ea96.tar.gz chromium_src-65427246e1e92d969593c092aaadbeeca700ea96.tar.bz2 |
Set default text input type to NONE for NaCl apps on OSX
This is a temporary solution for Lion key-repeat + popup issue.
When Pepper IME API is exposed to NaCl apps, each apps should
set the text input type apporpriately.
BUG=chromium:102808
TEST=Run any NaCl app on Lion and hold 'a' key for a while to see the variant selector popup will not show up.
Review URL: http://codereview.chromium.org/8815008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113571 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/native_client/src/trusted/plugin/plugin.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ppapi/native_client/src/trusted/plugin/plugin.cc b/ppapi/native_client/src/trusted/plugin/plugin.cc index 5409907..ce4ff181 100644 --- a/ppapi/native_client/src/trusted/plugin/plugin.cc +++ b/ppapi/native_client/src/trusted/plugin/plugin.cc @@ -67,6 +67,7 @@ #include "ppapi/cpp/dev/printing_dev.h" #include "ppapi/cpp/dev/scrollbar_dev.h" #include "ppapi/cpp/dev/selection_dev.h" +#include "ppapi/cpp/dev/text_input_dev.h" #include "ppapi/cpp/dev/url_util_dev.h" #include "ppapi/cpp/dev/widget_client_dev.h" #include "ppapi/cpp/dev/zoom_dev.h" @@ -579,6 +580,16 @@ bool Plugin::Init(BrowserInterface* browser_interface, char* argv[]) { PLUGIN_PRINTF(("Plugin::Init (instance=%p)\n", static_cast<void*>(this))); +#ifdef NACL_OSX + // TODO(kochi): For crbug.com/102808, this is a stopgap solution for Lion + // until we expose IME API to .nexe. This disables any IME interference + // against key inputs, so you cannot use off-the-spot IME input for NaCl apps. + // This makes discrepancy among platforms and therefore we should remove + // this hack when IME API is made available. + // The default for non-Mac platforms is still off-the-spot IME mode. + pp::TextInput_Dev(this).SetTextInputType(PP_TEXTINPUT_TYPE_NONE); +#endif + browser_interface_ = browser_interface; // Remember the embed/object argn/argv pairs. argn_ = new(std::nothrow) char*[argc]; |