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

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

Issue 826713002: [ChromeOS] Show autofill popup after keyboard (if any) is shown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable autofill popup waiting for keyboard when keyboard has been disabled. Created 5 years, 11 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 | « ui/base/ime/input_method_chromeos.h ('k') | ui/base/ime/input_method_observer.h » ('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 <algorithm> 7 #include <algorithm>
8 #include <cstring> 8 #include <cstring>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 } // namespace 31 } // namespace
32 32
33 namespace ui { 33 namespace ui {
34 34
35 // InputMethodChromeOS implementation ----------------------------------------- 35 // InputMethodChromeOS implementation -----------------------------------------
36 InputMethodChromeOS::InputMethodChromeOS( 36 InputMethodChromeOS::InputMethodChromeOS(
37 internal::InputMethodDelegate* delegate) 37 internal::InputMethodDelegate* delegate)
38 : composing_text_(false), 38 : composing_text_(false),
39 composition_changed_(false), 39 composition_changed_(false),
40 on_screen_keyboard_supported_(false),
40 current_keyevent_id_(0), 41 current_keyevent_id_(0),
41 weak_ptr_factory_(this) { 42 weak_ptr_factory_(this) {
42 SetDelegate(delegate); 43 SetDelegate(delegate);
43 chromeos::IMEBridge::Get()->SetInputContextHandler(this); 44 chromeos::IMEBridge::Get()->SetInputContextHandler(this);
44 45
45 UpdateContextFocusState(); 46 UpdateContextFocusState();
46 } 47 }
47 48
48 InputMethodChromeOS::~InputMethodChromeOS() { 49 InputMethodChromeOS::~InputMethodChromeOS() {
49 AbandonAllPendingKeyEvents(); 50 AbandonAllPendingKeyEvents();
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 // focus and after it acquires focus again are the same. 278 // focus and after it acquires focus again are the same.
278 UpdateContextFocusState(); 279 UpdateContextFocusState();
279 280
280 if (GetEngine()) { 281 if (GetEngine()) {
281 chromeos::IMEEngineHandlerInterface::InputContext context( 282 chromeos::IMEEngineHandlerInterface::InputContext context(
282 GetTextInputType(), GetTextInputMode(), GetTextInputFlags()); 283 GetTextInputType(), GetTextInputMode(), GetTextInputFlags());
283 GetEngine()->FocusIn(context); 284 GetEngine()->FocusIn(context);
284 } 285 }
285 } 286 }
286 287
288 void InputMethodChromeOS::SetSupportsOnScreenKeyboard(bool supported) {
289 on_screen_keyboard_supported_ = supported;
290 }
291
292 bool InputMethodChromeOS::SupportsOnScreenKeyboard() const {
293 return on_screen_keyboard_supported_;
294 }
295
287 void InputMethodChromeOS::ConfirmCompositionText() { 296 void InputMethodChromeOS::ConfirmCompositionText() {
288 TextInputClient* client = GetTextInputClient(); 297 TextInputClient* client = GetTextInputClient();
289 if (client && client->HasCompositionText()) 298 if (client && client->HasCompositionText())
290 client->ConfirmCompositionText(); 299 client->ConfirmCompositionText();
291 300
292 ResetContext(); 301 ResetContext();
293 } 302 }
294 303
295 void InputMethodChromeOS::ResetContext() { 304 void InputMethodChromeOS::ResetContext() {
296 if (!IsNonPasswordInputFieldFocused() || !GetTextInputClient()) 305 if (!IsNonPasswordInputFieldFocused() || !GetTextInputClient())
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 bool InputMethodChromeOS::IsNonPasswordInputFieldFocused() { 674 bool InputMethodChromeOS::IsNonPasswordInputFieldFocused() {
666 TextInputType type = GetTextInputType(); 675 TextInputType type = GetTextInputType();
667 return (type != TEXT_INPUT_TYPE_NONE) && (type != TEXT_INPUT_TYPE_PASSWORD); 676 return (type != TEXT_INPUT_TYPE_NONE) && (type != TEXT_INPUT_TYPE_PASSWORD);
668 } 677 }
669 678
670 bool InputMethodChromeOS::IsInputFieldFocused() { 679 bool InputMethodChromeOS::IsInputFieldFocused() {
671 return GetTextInputType() != TEXT_INPUT_TYPE_NONE; 680 return GetTextInputType() != TEXT_INPUT_TYPE_NONE;
672 } 681 }
673 682
674 } // namespace ui 683 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_chromeos.h ('k') | ui/base/ime/input_method_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698