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

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

Issue 23478020: Makes sure that an input method doesn't reference to a destroyed object. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Worked on nits. Created 7 years, 3 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/mock_input_method.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/mock_input_method.cc
diff --git a/ui/base/ime/mock_input_method.cc b/ui/base/ime/mock_input_method.cc
index aed83c2ba72ae349c443e91c81eaf7eb47c0d9a4..58134fa431306468c028a266ef1d37520a070c68 100644
--- a/ui/base/ime/mock_input_method.cc
+++ b/ui/base/ime/mock_input_method.cc
@@ -24,6 +24,11 @@ void MockInputMethod::SetFocusedTextInputClient(TextInputClient* client) {
OnTextInputTypeChanged(client);
}
+void MockInputMethod::DetachTextInputClient(TextInputClient* client) {
+ if (text_input_client_ == client)
+ text_input_client_ = NULL;
+}
+
TextInputClient* MockInputMethod::GetTextInputClient() const {
return text_input_client_;
}
« no previous file with comments | « ui/base/ime/mock_input_method.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698