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

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: 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
« ui/base/ime/input_method.h ('K') | « 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..b577d90ca568e0aa1ccd4dd8c333a35b94465cb1 100644
--- a/ui/base/ime/mock_input_method.cc
+++ b/ui/base/ime/mock_input_method.cc
@@ -24,6 +24,12 @@ void MockInputMethod::SetFocusedTextInputClient(TextInputClient* client) {
OnTextInputTypeChanged(client);
}
+void MockInputMethod::DetachTextInputClient(TextInputClient* client) {
+ if (text_input_client_ == client) {
Seigo Nonaka 2013/09/04 10:19:21 nit: no need braces for one liner.
Yuki 2013/09/04 14:01:52 Done.
+ text_input_client_ = NULL;
+ }
+}
+
TextInputClient* MockInputMethod::GetTextInputClient() const {
return text_input_client_;
}
« ui/base/ime/input_method.h ('K') | « 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