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

Unified Diff: ui/base/ime/input_method_base.cc

Issue 1566083002: Makes sure the keyboard typing isn't blocked when InputMethod::OnFocus() is not correctly called. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remote_input_method_win.cc is gone again. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/ime/input_method_base.h ('k') | ui/base/ime/input_method_log_collector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/input_method_base.cc
diff --git a/ui/base/ime/input_method_base.cc b/ui/base/ime/input_method_base.cc
index 3441f928b90ac43904356b406a51997ea0d60ffa..97024545345210352f18b9f443485b1b51f22714 100644
--- a/ui/base/ime/input_method_base.cc
+++ b/ui/base/ime/input_method_base.cc
@@ -15,10 +15,10 @@
namespace ui {
InputMethodBase::InputMethodBase()
- : delegate_(NULL),
- text_input_client_(NULL),
- system_toplevel_window_focused_(false) {
-}
+ : delegate_(NULL),
+ text_input_client_(NULL),
+ system_toplevel_window_focused_(false),
+ log_collector_(new InputMethodLogCollector()) {}
InputMethodBase::~InputMethodBase() {
FOR_EACH_OBSERVER(InputMethodObserver,
@@ -36,6 +36,8 @@ void InputMethodBase::OnFocus() {
void InputMethodBase::OnBlur() {
system_toplevel_window_focused_ = false;
+ log_collector_->ClearLogs();
+ log_collector_->AddString("Input method is blurred.");
}
void InputMethodBase::SetFocusedTextInputClient(TextInputClient* client) {
@@ -90,6 +92,10 @@ void InputMethodBase::RemoveObserver(InputMethodObserver* observer) {
observer_list_.RemoveObserver(observer);
}
+InputMethodLogCollector* InputMethodBase::GetLogCollector() {
+ return log_collector_.get();
+}
+
bool InputMethodBase::IsTextInputClientFocused(const TextInputClient* client) {
return client && (client == GetTextInputClient());
}
« no previous file with comments | « ui/base/ime/input_method_base.h ('k') | ui/base/ime/input_method_log_collector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698