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

Issue 433163005: Refactoring for InputMethodEngine and InputMethodEventRouter. (Closed)

Created:
6 years, 4 months ago by Shu Chen
Modified:
6 years, 4 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, penghuang+watch_chromium.org, nona+watch_chromium.org, oshima+watch_chromium.org, chromium-apps-reviews_chromium.org, James Su, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, nkostylev+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Refactoring for InputMethodEngine and InputMethodEventRouter. 1) Makes InputMethodEngine extension based instead of input component based. 2) Makes InputMethodEngine independent to user profile. 3) Makes InputMethodEventRouter independent to user profile, except forwarding events to extension. BUG=342336 TEST=Verified on sandbox. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287781

Patch Set 1 #

Patch Set 2 : nits. #

Total comments: 16

Patch Set 3 : modified per review comments. #

Patch Set 4 : fixed a bug. #

Total comments: 19

Patch Set 5 : rebased, and revised per review comments. #

Patch Set 6 : nits + compile/test green #

Patch Set 7 : error tolerance for missing background page for key events. #

Total comments: 32

Patch Set 8 : nits #

Patch Set 9 : fixed browser_tests: ExtensionApiTest.InputImeApiBasic #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+366 lines, -477 lines) Patch
M chrome/browser/chromeos/input_method/input_method_engine.h View 1 2 3 4 5 5 chunks +9 lines, -33 lines 0 comments Download
M chrome/browser/chromeos/input_method/input_method_engine.cc View 1 2 3 4 5 6 7 19 chunks +36 lines, -83 lines 0 comments Download
M chrome/browser/chromeos/input_method/input_method_engine_browsertests.cc View 1 2 3 4 3 chunks +8 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/input_method/input_method_engine_interface.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/input_method/input_method_engine_unittest.cc View 1 2 3 4 5 6 7 7 chunks +12 lines, -19 lines 0 comments Download
M chrome/browser/chromeos/input_method/input_method_manager_impl.h View 1 2 3 4 5 6 7 3 chunks +6 lines, -16 lines 2 comments Download
M chrome/browser/chromeos/input_method/input_method_manager_impl.cc View 1 2 3 4 5 6 7 4 chunks +68 lines, -60 lines 0 comments Download
M chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc View 1 2 3 4 5 10 chunks +30 lines, -24 lines 0 comments Download
M chrome/browser/chromeos/input_method/mock_input_method_engine.h View 1 2 3 4 5 3 chunks +4 lines, -8 lines 0 comments Download
M chrome/browser/chromeos/input_method/mock_input_method_engine.cc View 1 2 3 4 5 6 7 2 chunks +6 lines, -10 lines 0 comments Download
M chrome/browser/chromeos/input_method/mock_input_method_manager.h View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/input_method/mock_input_method_manager.cc View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/input_ime/input_ime_api.h View 1 2 3 4 5 6 7 3 chunks +8 lines, -14 lines 0 comments Download
M chrome/browser/extensions/api/input_ime/input_ime_api.cc View 1 2 3 4 5 6 7 8 16 chunks +144 lines, -179 lines 0 comments Download
M chromeos/ime/extension_ime_util.h View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 0 comments Download
M chromeos/ime/extension_ime_util.cc View 1 2 3 4 5 6 7 2 chunks +12 lines, -5 lines 0 comments Download
M chromeos/ime/input_method_manager.h View 1 2 3 4 1 chunk +3 lines, -4 lines 0 comments Download
M ui/base/ime/chromeos/ime_bridge.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M ui/base/ime/chromeos/mock_ime_engine_handler.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M ui/base/ime/chromeos/mock_ime_engine_handler.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 23 (0 generated)
Shu Chen
Nona/Yuki/Alex, can you please review this cl? Nona for overall refactoring solution and potential breakages ...
6 years, 4 months ago (2014-08-04 13:58:35 UTC) #1
Shu Chen
Nona/Yuki/Alex, can you please review this cl? Nona for overall refactoring solution and potential breakages ...
6 years, 4 months ago (2014-08-04 13:58:36 UTC) #2
Shu Chen
https://codereview.chromium.org/433163005/diff/20001/chrome/browser/chromeos/input_method/input_method_engine.cc File chrome/browser/chromeos/input_method/input_method_engine.cc (right): https://codereview.chromium.org/433163005/diff/20001/chrome/browser/chromeos/input_method/input_method_engine.cc#newcode479 chrome/browser/chromeos/input_method/input_method_engine.cc:479: input_method::InputMethodManager::Get(); Here could just use input_method::InputMethodManager::Get()->GetCurrentInputMethod(). https://codereview.chromium.org/433163005/diff/20001/chrome/browser/chromeos/input_method/input_method_manager_impl.cc File chrome/browser/chromeos/input_method/input_method_manager_impl.cc ...
6 years, 4 months ago (2014-08-04 15:59:31 UTC) #3
Seigo Nonaka
https://codereview.chromium.org/433163005/diff/20001/chrome/browser/chromeos/input_method/input_method_engine.cc File chrome/browser/chromeos/input_method/input_method_engine.cc (right): https://codereview.chromium.org/433163005/diff/20001/chrome/browser/chromeos/input_method/input_method_engine.cc#newcode479 chrome/browser/chromeos/input_method/input_method_engine.cc:479: input_method::InputMethodManager::Get(); Seems yes. On 2014/08/04 15:59:31, Shu Chen wrote: ...
6 years, 4 months ago (2014-08-04 23:29:48 UTC) #4
Shu Chen
Thanks for your review. Can you please take another look? https://codereview.chromium.org/433163005/diff/20001/chrome/browser/chromeos/input_method/input_method_engine.cc File chrome/browser/chromeos/input_method/input_method_engine.cc (right): https://codereview.chromium.org/433163005/diff/20001/chrome/browser/chromeos/input_method/input_method_engine.cc#newcode479 ...
6 years, 4 months ago (2014-08-05 01:23:10 UTC) #5
Shu Chen
https://codereview.chromium.org/433163005/diff/20001/chrome/browser/chromeos/input_method/input_method_engine.cc File chrome/browser/chromeos/input_method/input_method_engine.cc (right): https://codereview.chromium.org/433163005/diff/20001/chrome/browser/chromeos/input_method/input_method_engine.cc#newcode479 chrome/browser/chromeos/input_method/input_method_engine.cc:479: input_method::InputMethodManager::Get(); On 2014/08/04 23:29:47, Seigo Nonaka wrote: > Seems ...
6 years, 4 months ago (2014-08-05 01:59:03 UTC) #6
Seigo Nonaka
lgtm. Could you kindly double check this patch works on Chrome OS devices. I'd like ...
6 years, 4 months ago (2014-08-05 02:11:25 UTC) #7
Yuki
Mostly minor nits, but one important comment I have. https://codereview.chromium.org/433163005/diff/60001/chrome/browser/chromeos/input_method/input_method_engine.cc File chrome/browser/chromeos/input_method/input_method_engine.cc (right): https://codereview.chromium.org/433163005/diff/60001/chrome/browser/chromeos/input_method/input_method_engine.cc#newcode134 chrome/browser/chromeos/input_method/input_method_engine.cc:134: ...
6 years, 4 months ago (2014-08-05 07:57:18 UTC) #8
Shu Chen
https://codereview.chromium.org/433163005/diff/60001/chrome/browser/chromeos/input_method/input_method_engine.cc File chrome/browser/chromeos/input_method/input_method_engine.cc (right): https://codereview.chromium.org/433163005/diff/60001/chrome/browser/chromeos/input_method/input_method_engine.cc#newcode134 chrome/browser/chromeos/input_method/input_method_engine.cc:134: observer_ = observer.Pass(); On 2014/08/05 07:57:18, Yuki wrote: > ...
6 years, 4 months ago (2014-08-05 14:04:31 UTC) #9
Shu Chen
https://codereview.chromium.org/433163005/diff/60001/chrome/browser/chromeos/input_method/input_method_engine.cc File chrome/browser/chromeos/input_method/input_method_engine.cc (right): https://codereview.chromium.org/433163005/diff/60001/chrome/browser/chromeos/input_method/input_method_engine.cc#newcode134 chrome/browser/chromeos/input_method/input_method_engine.cc:134: observer_ = observer.Pass(); On 2014/08/05 14:04:31, Shu Chen wrote: ...
6 years, 4 months ago (2014-08-05 15:36:00 UTC) #10
Alexander Alekseev
lgtm
6 years, 4 months ago (2014-08-05 16:01:02 UTC) #11
Yuki
lgtm https://codereview.chromium.org/433163005/diff/120001/chrome/browser/chromeos/input_method/input_method_engine.cc File chrome/browser/chromeos/input_method/input_method_engine.cc (right): https://codereview.chromium.org/433163005/diff/120001/chrome/browser/chromeos/input_method/input_method_engine.cc#newcode542 chrome/browser/chromeos/input_method/input_method_engine.cc:542: active_component_id_ = ""; active_component_id_.clear() could be slightly better. ...
6 years, 4 months ago (2014-08-06 04:42:24 UTC) #12
Shu Chen
https://codereview.chromium.org/433163005/diff/120001/chrome/browser/chromeos/input_method/input_method_engine.cc File chrome/browser/chromeos/input_method/input_method_engine.cc (right): https://codereview.chromium.org/433163005/diff/120001/chrome/browser/chromeos/input_method/input_method_engine.cc#newcode542 chrome/browser/chromeos/input_method/input_method_engine.cc:542: active_component_id_ = ""; On 2014/08/06 04:42:23, Yuki wrote: > ...
6 years, 4 months ago (2014-08-06 05:45:04 UTC) #13
Shu Chen
The CQ bit was checked by shuchen@chromium.org
6 years, 4 months ago (2014-08-06 05:45:09 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shuchen@chromium.org/433163005/140001
6 years, 4 months ago (2014-08-06 05:49:26 UTC) #15
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-06 08:33:50 UTC) #16
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-06 09:16:39 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_swarming/builds/1524)
6 years, 4 months ago (2014-08-06 09:16:40 UTC) #18
Shu Chen
The CQ bit was checked by shuchen@chromium.org
6 years, 4 months ago (2014-08-06 14:05:45 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shuchen@chromium.org/433163005/160001
6 years, 4 months ago (2014-08-06 14:06:25 UTC) #20
commit-bot: I haz the power
Change committed as 287781
6 years, 4 months ago (2014-08-06 16:34:58 UTC) #21
Alexander Alekseev
https://codereview.chromium.org/433163005/diff/160001/chrome/browser/chromeos/input_method/input_method_manager_impl.h File chrome/browser/chromeos/input_method/input_method_manager_impl.h (right): https://codereview.chromium.org/433163005/diff/160001/chrome/browser/chromeos/input_method/input_method_manager_impl.h#newcode205 chrome/browser/chromeos/input_method/input_method_manager_impl.h:205: base::WeakPtrFactory<InputMethodManagerImpl> weak_ptr_factory_; This should be the last member.
6 years, 4 months ago (2014-08-06 20:48:29 UTC) #22
Shu Chen
6 years, 4 months ago (2014-08-07 00:44:28 UTC) #23
Message was sent while issue was closed.
https://codereview.chromium.org/433163005/diff/160001/chrome/browser/chromeos...
File chrome/browser/chromeos/input_method/input_method_manager_impl.h (right):

https://codereview.chromium.org/433163005/diff/160001/chrome/browser/chromeos...
chrome/browser/chromeos/input_method/input_method_manager_impl.h:205:
base::WeakPtrFactory<InputMethodManagerImpl> weak_ptr_factory_;
On 2014/08/06 20:48:28, alemate wrote:
> This should be the last member.

I don't see any code is using it. Probably it should be removed?

Powered by Google App Engine
This is Rietveld 408576698