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

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

Issue 20526005: Implement virtual keyboard hiding. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Init Created 7 years, 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_base.h" 5 #include "ui/base/ime/input_method_base.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/base/ime/input_method_delegate.h" 8 #include "ui/base/ime/input_method_delegate.h"
9 #include "ui/base/ime/input_method_observer.h" 9 #include "ui/base/ime/input_method_observer.h"
10 #include "ui/base/ime/text_input_client.h" 10 #include "ui/base/ime/text_input_client.h"
(...skipping 24 matching lines...) Expand all
35 void InputMethodBase::OnFocus() { 35 void InputMethodBase::OnFocus() {
36 DCHECK(!system_toplevel_window_focused_); 36 DCHECK(!system_toplevel_window_focused_);
37 system_toplevel_window_focused_ = true; 37 system_toplevel_window_focused_ = true;
38 } 38 }
39 39
40 void InputMethodBase::OnBlur() { 40 void InputMethodBase::OnBlur() {
41 DCHECK(system_toplevel_window_focused_); 41 DCHECK(system_toplevel_window_focused_);
42 system_toplevel_window_focused_ = false; 42 system_toplevel_window_focused_ = false;
43 } 43 }
44 44
45 void InputMethodBase::OnPossibleRefocus() {
46 NotifyTextInputStateChanged(text_input_client_);
47 }
48
45 void InputMethodBase::SetFocusedTextInputClient(TextInputClient* client) { 49 void InputMethodBase::SetFocusedTextInputClient(TextInputClient* client) {
46 TextInputClient* old = text_input_client_; 50 TextInputClient* old = text_input_client_;
47 OnWillChangeFocusedClient(old, client); 51 OnWillChangeFocusedClient(old, client);
48 text_input_client_ = client; // NULL allowed. 52 text_input_client_ = client; // NULL allowed.
49 OnDidChangeFocusedClient(old, client); 53 OnDidChangeFocusedClient(old, client);
50 54
51 if (old != text_input_client_) 55 if (old != text_input_client_)
52 NotifyTextInputStateChanged(text_input_client_); 56 NotifyTextInputStateChanged(text_input_client_);
53 } 57 }
54 58
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 111 }
108 112
109 void InputMethodBase::NotifyTextInputStateChanged( 113 void InputMethodBase::NotifyTextInputStateChanged(
110 const TextInputClient* client) { 114 const TextInputClient* client) {
111 FOR_EACH_OBSERVER(InputMethodObserver, 115 FOR_EACH_OBSERVER(InputMethodObserver,
112 observer_list_, 116 observer_list_,
113 OnTextInputStateChanged(client)); 117 OnTextInputStateChanged(client));
114 } 118 }
115 119
116 } // namespace ui 120 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698