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

Side by Side Diff: ui/base/ime/input_method_chromeos.cc

Issue 1786483002: Add DomKey&DomCode to fabricated keydown event if exists (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit test Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ui/base/ime/input_method_chromeos_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/ime/input_method_chromeos.h" 5 #include "ui/base/ime/input_method_chromeos.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cstring> 10 #include <cstring>
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 ignore_result(DispatchKeyEventPostIME(event)); 354 ignore_result(DispatchKeyEventPostIME(event));
355 } 355 }
356 356
357 void InputMethodChromeOS::ProcessFilteredKeyPressEvent(ui::KeyEvent* event) { 357 void InputMethodChromeOS::ProcessFilteredKeyPressEvent(ui::KeyEvent* event) {
358 if (NeedInsertChar()) { 358 if (NeedInsertChar()) {
359 ignore_result(DispatchKeyEventPostIME(event)); 359 ignore_result(DispatchKeyEventPostIME(event));
360 return; 360 return;
361 } 361 }
362 ui::KeyEvent fabricated_event(ET_KEY_PRESSED, 362 ui::KeyEvent fabricated_event(ET_KEY_PRESSED,
363 VKEY_PROCESSKEY, 363 VKEY_PROCESSKEY,
364 event->flags()); 364 event->code(),
365 event->flags(),
366 event->GetDomKey(),
367 event->time_stamp());
Shu Chen 2016/03/11 16:24:53 Can you please confirm whether the CJK input metho
chongz 2016/03/11 21:17:26 Sure, but can I have some help on how to include I
Shu Chen 2016/03/14 01:32:17 Ack. It makes sense.
365 ignore_result(DispatchKeyEventPostIME(&fabricated_event)); 368 ignore_result(DispatchKeyEventPostIME(&fabricated_event));
366 if (fabricated_event.stopped_propagation()) 369 if (fabricated_event.stopped_propagation())
367 event->StopPropagation(); 370 event->StopPropagation();
368 } 371 }
369 372
370 void InputMethodChromeOS::ProcessUnfilteredKeyPressEvent( 373 void InputMethodChromeOS::ProcessUnfilteredKeyPressEvent(
371 ui::KeyEvent* event) { 374 ui::KeyEvent* event) {
372 const TextInputClient* prev_client = GetTextInputClient(); 375 const TextInputClient* prev_client = GetTextInputClient();
373 ignore_result(DispatchKeyEventPostIME(event)); 376 ignore_result(DispatchKeyEventPostIME(event));
374 if (event->stopped_propagation()) { 377 if (event->stopped_propagation()) {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 bool InputMethodChromeOS::IsNonPasswordInputFieldFocused() { 636 bool InputMethodChromeOS::IsNonPasswordInputFieldFocused() {
634 TextInputType type = GetTextInputType(); 637 TextInputType type = GetTextInputType();
635 return (type != TEXT_INPUT_TYPE_NONE) && (type != TEXT_INPUT_TYPE_PASSWORD); 638 return (type != TEXT_INPUT_TYPE_NONE) && (type != TEXT_INPUT_TYPE_PASSWORD);
636 } 639 }
637 640
638 bool InputMethodChromeOS::IsInputFieldFocused() { 641 bool InputMethodChromeOS::IsInputFieldFocused() {
639 return GetTextInputType() != TEXT_INPUT_TYPE_NONE; 642 return GetTextInputType() != TEXT_INPUT_TYPE_NONE;
640 } 643 }
641 644
642 } // namespace ui 645 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/base/ime/input_method_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698