summaryrefslogtreecommitdiffstats
path: root/ui/base/ime/input_method_ibus.h
Commit message (Collapse)AuthorAgeFilesLines
* Decuple chromeos/dbus/ibus from ui/base/imenona@chromium.org2013-09-121-45/+3
| | | | | | | | | | | | | | | The major changes from IBus implementation are: - Never fail posting keyboard event, it is now just function call. - The dbus module is gone so there is no state "before initialized" or "initialized but connection is out". - Also we can remove async initialize code. - We can treat GetEngineHandler() == NULL as XKB layout. BUG=275262 TEST=Manually checked and also confirmed all tests are passed. Review URL: https://chromiumcodereview.appspot.com/22818008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222750 0039d316-1c4b-4281-b951-d872f2087c98
* Move Range code to gfx.ben@chromium.org2013-09-061-1/+1
| | | | | | | | | | | Part of a set of changes to fix the circular dependency between ui/base and ui/gfx, with the aim of making gfx its own component. R=jam@chromium.org, jschuh@chromium.org, rsesek@chromium.org BUG=285385,103304 Review URL: https://codereview.chromium.org/24012002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221762 0039d316-1c4b-4281-b951-d872f2087c98
* Remove IBus specific hack from InputMethodIBus.nona@chromium.org2013-09-051-4/+0
| | | | | | | | | BUG=None TEST=None, just working fine. Review URL: https://chromiumcodereview.appspot.com/22909048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221394 0039d316-1c4b-4281-b951-d872f2087c98
* Move ibus related interface to chromeos/imenona@chromium.org2013-08-201-0/+1
| | | | | | | | | | | | To remove chromeos/dbus/ibus dependency from each module, need to move interface to chromeos/ime temporary. BUG=158273 TEST=IME does not break. Review URL: https://chromiumcodereview.appspot.com/23232004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218451 0039d316-1c4b-4281-b951-d872f2087c98
* Fix file permissions for https://chromiumcodereview.appspot.com/17112021rmsousa@chromium.org2013-06-211-0/+0
| | | | | | | | | TBR=dmichael@chromium.org BUG= Review URL: https://codereview.chromium.org/16943013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207912 0039d316-1c4b-4281-b951-d872f2087c98
* New method: InputMethod::IsCandidatePopupOpen()yukishiino@chromium.org2013-06-211-0/+1
| | | | | | | | | | | | Supports a new method {ui,views}::InputMethod::IsCandidatePopupOpen(), which returns true if a candidate window is open. BUG=245578 TEST=Test manually. Review URL: https://chromiumcodereview.appspot.com/17112021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207858 0039d316-1c4b-4281-b951-d872f2087c98
* Add OnUntranslatedIMEMessage/OnInputLocaleChanged.Yukawa@chromium.org2013-06-131-0/+3
| | | | | | | | | | | | | | | Add two more methods into InputMethod interface. This is because current implementation relies on downcasting to handle Windows specific IME events. These new methods can be used to safely propagate these events via platform-neutral interface class to the implementation classes for Windows. BUG=246534 Review URL: https://chromiumcodereview.appspot.com/16814004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206146 0039d316-1c4b-4281-b951-d872f2087c98
* Treat character composer as IME (2nd try).nona@chromium.org2013-06-071-13/+7
| | | | | | | | | | | | | | | Character composer does many IME operations, e.g. drawing composition or committing texts. So that it should be handled as IME. BUG=246859 TEST=Type "Ctrl+Shift+U, 4, 3, 2, 1, enter" and corresponding character is inserted on Google Docs/Gmail Compose Window/Norma Text Area/Omnibox . And also checked for some dead keys. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=204299 Review URL: https://chromiumcodereview.appspot.com/15710005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204790 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 204299 "Treat character composer as IME."nona@chromium.org2013-06-071-7/+13
| | | | | | | | | | | | | | | | | | | | | Cause https://crbug.com/247563 regression. > Treat character composer as IME. > > Character composer does many IME operations, e.g. drawing composition or > committing texts. So that it should be handled as IME. > > BUG=246859 > TEST=Type "Ctrl+Shift+U, 4, 3, 2, 1, enter" and corresponding character is > inserted on Google Docs/Gmail Compose Window/Norma Text Area/Omnibox . And also checked for some dead keys. > > Review URL: https://chromiumcodereview.appspot.com/15710005 TBR=nona@chromium.org Review URL: https://codereview.chromium.org/16081009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204713 0039d316-1c4b-4281-b951-d872f2087c98
* Treat character composer as IME.nona@chromium.org2013-06-051-13/+7
| | | | | | | | | | | | | Character composer does many IME operations, e.g. drawing composition or committing texts. So that it should be handled as IME. BUG=246859 TEST=Type "Ctrl+Shift+U, 4, 3, 2, 1, enter" and corresponding character is inserted on Google Docs/Gmail Compose Window/Norma Text Area/Omnibox . And also checked for some dead keys. Review URL: https://chromiumcodereview.appspot.com/15710005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204299 0039d316-1c4b-4281-b951-d872f2087c98
* Supports unicode composition(Ctrl+Shift+U) with C-S pressed.yukishiino@chromium.org2013-05-241-7/+14
| | | | | | | | | | | | | | | | | The current implementation does not support to input a hexadecimal sequence (e.g. 3042) with control and shift keys held pressed. Users have to release control and shift keys first, and then users can input a hexadecimal sequence. This CL supports to input a hexadecimal sequence while a user holds control and shift keys pressed. This CL passes a keycode to CharacterComposer::FilterKeyPress() and let it guess what character would be inputted if a user had already released control and shift keys. NOTE: If a user holds shift key pressed, hitting '3' key produces '#' (shift + 3). BUG=126988 TEST=Type "u3042<enter>" with control and shift keys pressed. "あ" will be composed. Review URL: https://chromiumcodereview.appspot.com/15816003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202041 0039d316-1c4b-4281-b951-d872f2087c98
* Call ExtendSelectionAndDelete instead of Backspace forwarding.nona@chromium.org2013-05-071-0/+1
| | | | | | | | | | | It turned out that backspace forwarding makes omnibox confusing or breaks some web application. BUG=234914 TEST=Manually done on my device and Linux Desktop Review URL: https://chromiumcodereview.appspot.com/13843026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198677 0039d316-1c4b-4281-b951-d872f2087c98
* Ensure that the Alt key is handled correctly in Windows desktop AURA.ananta@chromium.org2013-03-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Alt key on its own sends the WM_SYSKEYDOWN/UP messages to the queue. These messages have to be defproc'ed to get the WM_SYSCOMMAND with SC_KEYMENU to be posted to the queue which is where Chrome sets the focus to the menu bar. Alt Space sends in the WM_SYSCHAR message which has to be defproc'ed to get the WM_SYSCOMMAND which when defproc'ed displays the system menu. This works well on non AURA chrome. In AURA chrome, we always set keyboard and char messages as handled which results in the WM_SYSCOMMAND message not coming in thus leading to the problem. Fix is to return a bool from the InputMethodDelegate interface methods DispatchKeyEventPostIME and DispatchFabricatedKeyEventPostIME and to ensure that the return values from these code paths correctly reflect whether the event was handled or not. In the InputMethodEventFilter::OnKeyEvent function we check if the event was handled before stopping propagation. On Windows when we return false from the keyevent handling the message would be defproc'ed which ensures that Alt is handled correctly. To handle WM_SYSCHAR with VK_SPACE, i.e. Alt + Space which brings up the sysmenu on Windows, a change was made to the InputMethodWin::OnChar function where we explicitly check for this message and set handled to false. This is the only WM_SYSCHAR message we need to handle. Fixes bug https://code.google.com/p/chromium/issues/detail?id=181303 BUG=181303 R=cpu TEST=Covered by interactive browser tests TestAltMenuKeyboardAccessFocusOmnibox and TestSystemMenuWithKeyboard Review URL: https://codereview.chromium.org/12669003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187907 0039d316-1c4b-4281-b951-d872f2087c98
* Use IBusDaemonController instead of IBusController.nona@chromium.org2013-03-041-7/+7
| | | | | | | | | | | | | I introduced IBusDaemonController(https://codereview.chromium.org/12045007/) which launches ibus-daemon process and watch it's availability. Before this patch, IBusController is responsible for this functionality. BUG=None TEST=try bots. Review URL: https://chromiumcodereview.appspot.com/12317143 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185842 0039d316-1c4b-4281-b951-d872f2087c98
* Remove ibus namespace.nona@chromium.org2013-01-311-3/+3
| | | | | | | | | | | | | ibus namespace is temporary introduced for avoiding name collision with libibus. So it's time to remove ibus namespace because libibus is already gone. BUG=None TEST=try bots. Review URL: https://chromiumcodereview.appspot.com/11783053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179889 0039d316-1c4b-4281-b951-d872f2087c98
* Move SetCursorLocation bypass code.nona@chromium.org2013-01-301-10/+0
| | | | | | | | | | | | | | | | | | | | | | Current Chrome does not emit SetCursorLocation message to ibus-daemon because both candidate window and input context is in same process. It was achieved by injecting IBusClient into ui::InputMethodIBus, but we are now able to bypass them only in chromeos/ directory. With this refactoring, we can remove ui::internal::IBusClient, IBusChromeOSClientImpl and their injection code. The concept of this refactoring is... 1) ui::InputMethodIBus should communicate with only chromeos::IBus*. Do not bypass chromeos::IBus* even if bypassing ibus-daemon. 2) chrome/browser/chromeos/input_method should communicate with only chromeos::IBus* current code handles SetCursorLocation as special case, but I think it shouldn't consider where the event is come from. Such special logic should be in chromeos/. With this patch, we can remove IBusUiController. BUG=None TEST=Manually done on lumpy. Review URL: https://chromiumcodereview.appspot.com/11956008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179644 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce interface instead of function callback.nona@chromium.org2013-01-211-9/+14
| | | | | | | | | | | | | This is preparation for ibus-daemon bypass implementation. Using interface is same as other modules in chromeos/dbus/ibus. BUG=None TEST=Manually done on lumpy and ran chromeos_unittests Review URL: https://chromiumcodereview.appspot.com/11970032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177894 0039d316-1c4b-4281-b951-d872f2087c98
* Support surrounding text feature.nona@chromium.org2012-11-071-1/+2
| | | | | | | | | | | | Some Thai input requires surrounding text feature. This patch implement full-spec surrounding text feature for ibus. BUG=158111 TEST=Ran ui_unittests and manually done on lumpy. Review URL: https://chromiumcodereview.appspot.com/11275148 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166383 0039d316-1c4b-4281-b951-d872f2087c98
* Changes on the Input method for metro ashcpu@chromium.org2012-10-191-0/+1
| | | | | | | | | | | | With this change and http://codereview.chromium.org/11194044/ you get some keyboard love in metro ash, like delete and tab work but no regular text input. BUG=151718 TEST=see bug Review URL: https://codereview.chromium.org/11183049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163030 0039d316-1c4b-4281-b951-d872f2087c98
* CleanUp: Remove PendingKeyEvent.nona@chromium.org2012-10-191-8/+6
| | | | | | | | | | | | | We no longer necessary static function for callback, so that we can remove PendingKeyEvent class. This CL depends http://codereview.chromium.org/11175004/ BUG=None TEST=Manually done on lumpy and check ui_unittests. Review URL: https://chromiumcodereview.appspot.com/11145035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162941 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce unit tests for ui::InputMethodIBusnona@chromium.org2012-10-181-8/+15
| | | | | | | | | | | | | This patch set only introduces unit tests for DispatchKeyEvent with DBus communication. The unit tests for ProcessKeyEventPostIME will be done by another patch set. BUG=134616 TEST=ran ui_unittests Review URL: https://chromiumcodereview.appspot.com/11175004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162760 0039d316-1c4b-4281-b951-d872f2087c98
* Remove PendingCreateICRequest.nona@chromium.org2012-08-081-7/+16
| | | | | | | | | | | | PendingCreateICRequest is no longer necessary because the libibus dependent code is gone, just state flag is fine. In addition to this, PendingCreateICRequest cause memory leak if the response from ibus-daemon is lost. BUG=134717,135049 TEST=ran ui_unittests and manually check on lumpy. Review URL: https://chromiumcodereview.appspot.com/10834175 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150517 0039d316-1c4b-4281-b951-d872f2087c98
* Support reverse conversion for ChromeOSnona@chromium.org2012-08-031-0/+2
| | | | | | | | | | | | | This cl does not support fully surrounding text retrieval, but it is enough to send selection text for reverse conversion. I will revisit fully SetSurroundingText implementation when it is required. BUG=127032 TEST=ran content_unittests, ui_unittests, chromeos_unittests Review URL: https://chromiumcodereview.appspot.com/10823141 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149824 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-111-1/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Add error handler for InputMethodIBus and default error handler in ↵nona@chromium.org2012-07-091-0/+1
| | | | | | | | | | | | | IBusInputContextClient. This CL is the first step of introducing ProcessKeyEvent unittests. BUG=134616 TEST=ran unittests and check manually on lumpy Review URL: https://chromiumcodereview.appspot.com/10672002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145706 0039d316-1c4b-4281-b951-d872f2087c98
* Remove IBusClientImpl from ui/base/ime/*nona@chromium.org2012-06-281-7/+17
| | | | | | | | | | | BUG=126947 TEST=ran ui_unittests and checked on lumpy Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=144677 Review URL: https://chromiumcodereview.appspot.com/10656017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144696 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 144677 - Remove IBusClientImpl from ui/base/ime/*nona@chromium.org2012-06-281-17/+7
| | | | | | | | | | | | BUG=126947 TEST=ran ui_unittests and checked on lumpy Review URL: https://chromiumcodereview.appspot.com/10656017 TBR=nona@chromium.org Review URL: https://chromiumcodereview.appspot.com/10700014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144682 0039d316-1c4b-4281-b951-d872f2087c98
* Remove IBusClientImpl from ui/base/ime/*nona@chromium.org2012-06-281-7/+17
| | | | | | | | | BUG=126947 TEST=ran ui_unittests and checked on lumpy Review URL: https://chromiumcodereview.appspot.com/10656017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144677 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Send correct DOM event when composing a character outside BMP with ↵hashimoto@chromium.org2012-06-271-0/+5
| | | | | | | | | | | | | Ctrl+Shift+U Use SetCompositionText() and ConfirmCompositionText() instead of InsertText() to send DOM events. BUG=133269 TEST=Open a document on docs.google.com, press Ctrl+Shift+U and type '12345', press Space and see a character is inserted to the document. Review URL: https://chromiumcodereview.appspot.com/10664030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144394 0039d316-1c4b-4281-b951-d872f2087c98
* Replace libibus api to chrome dbus module.nona@chromium.org2012-06-211-42/+48
| | | | | | | | | | | | | | | | | | | | | | This CL depends on codereview.chromium.org/10447022 for testing. This CL contains following changes: 1. Manages connection between ibus-daemon and chrome manually instead of libibus. Instead of "connect" and "disconnect" signals, we manually call OnConnected or OnDisconnected in chrome/browser/chromeos/input_method/ibus_controller_impl.cc which launches or kills the ibus-daemon. 2. Manages the life span of input context. The instance of InputContextClient is managed by DBusThreadManager as singleton object. The InputContextClient handles only one input context but it is sufficient. 3. Handles input context related method call or signal without libibus. There are no regression about handling method call and signal handling. BUG=126947 TEST=unit_tests,chromeos_unittests,ui_unittests,dbus_unittests and manually checked on alex Review URL: https://chromiumcodereview.appspot.com/10388220 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143346 0039d316-1c4b-4281-b951-d872f2087c98
* Do not send an IBus IPC message for updating a cursor location.yusukes@chromium.org2012-01-241-4/+3
| | | | | | | | | | | | Currently, every time the location of the input cursor in Chrome changes, ui::InputMethodIBus sends an IPC message to ibus-daemon by calling ibus_input_context_set_cursor_location API so that the IME candidate window could be shown in a proper position. However, the IPC is actually unnecessary since the candidate window is shown by the Chrome browser process itself. Instead of the IPC, we should update member variables in chromeos::input_method::IBusUiControllerImpl. BUG=chromium-os:25332 TEST=try Review URL: http://codereview.chromium.org/9241033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118851 0039d316-1c4b-4281-b951-d872f2087c98
* Write unit tests for ui::InputMethodIBus.yusukes@chromium.org2012-01-061-23/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the IME binding will be used in production soon, I'd like to add unit tests for the class to prevent future regressions. ibus_client.h - Define ui::IBusClient interface which abstracts ibus IPC and makes it possible to remove ibus function calls from ui::InputMethodIBus. ibus_client_impl.cc ibus_client_impl.h - A very thin wrapper around ibus which implements ui::IBusClient. libibus-dependent parts in ui::InputMethodIBus are moved to this class. input_method_ibus.cc - Removed all ibus related code. It uses ui::IBusClient interface instead to communicate with ibus-daemon. - Now the class is testable since it does not communicate with ibus-daemon directly, and can compile on build bots where HAVE_IBUS is not #defined. input_method_ibus_unittest.cc - The test. mock_ibus_client.cc mock_ibus_client.h - A dummy IBusClient implementation for the test. The dummy implementation requires neither ibus-daemon nor ibus header files. composition_text.h composition_underline.h - Add operator== and operator!=. ui.gyp - Compile mock_ibus_client, character_composer and input_method_ibus when use_aura==1 and use_x11==1. Note that these files do not depend on ibus. - Compile ibus_client_impl when use_aura==1 and use_ibus==1. ui_unittests.gypi - Compile character_composer_unittest and input_method_ibus_unittest when use_aura==1 and use_x11==1. The test does not depend on ibus. BUG=108172 TEST=ran linux_chromeos_aura bot Review URL: http://codereview.chromium.org/9005006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116654 0039d316-1c4b-4281-b951-d872f2087c98
* IME (input method editor) support for Aura, part 1 of 3: Add ui/base/ime/ ↵yusukes@chromium.org2011-12-061-0/+199
classes. ui::InputMethod: - An interface similar to views::InputMethod, but does not have Has neither Views nor Aura dependencies. ui::InputMethodIBus - Port of views::InputMethodIBus. Has neither Views nor Aura dependencies. Original review: http://codereview.chromium.org/8576005/ (PatchSet #1-8, Comment #1-24) BUG=97261 TEST=see part 3 of 3. Review URL: http://codereview.chromium.org/8659033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113095 0039d316-1c4b-4281-b951-d872f2087c98