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

Unified Diff: ui/base/ime/input_method.h

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/fake_input_method.cc ('k') | ui/base/ime/input_method_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/input_method.h
diff --git a/ui/base/ime/input_method.h b/ui/base/ime/input_method.h
index 0d4046f3e3f50e5f238d86e954b0062be1890144..4deaa543dd192d2f6470e575c7a2d0c1c46bf050 100644
--- a/ui/base/ime/input_method.h
+++ b/ui/base/ime/input_method.h
@@ -83,9 +83,14 @@ class InputMethod {
// SetCompositionText(). |client| can be NULL. A gfx::NativeWindow which
// implementes TextInputClient interface, e.g. NWA and RWHVA, should register
// itself by calling the method when it is focused, and unregister itself by
- // calling the metho with NULL when it is unfocused.
+ // calling the method with NULL when it is unfocused.
virtual void SetFocusedTextInputClient(TextInputClient* client) = 0;
+ // Detaches and forgets the |client| regardless of whether it has the focus or
+ // not. This method is meant to be called when the |client| is going to be
+ // destroyed.
+ virtual void DetachTextInputClient(TextInputClient* client) = 0;
+
// Gets the current text input client. Returns NULL when no client is set.
virtual TextInputClient* GetTextInputClient() const = 0;
« no previous file with comments | « ui/base/ime/fake_input_method.cc ('k') | ui/base/ime/input_method_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698