| Index: ui/views/controls/tree/tree_view.cc
|
| diff --git a/ui/views/controls/tree/tree_view.cc b/ui/views/controls/tree/tree_view.cc
|
| index e3e6194e37dc52d3e3dbf5a6f799efdc1bf2cd07..a59d46fc0a9ea758e318466024b8405b26467de0 100644
|
| --- a/ui/views/controls/tree/tree_view.cc
|
| +++ b/ui/views/controls/tree/tree_view.cc
|
| @@ -9,6 +9,7 @@
|
| #include "base/i18n/rtl.h"
|
| #include "base/message_loop/message_loop.h"
|
| #include "ui/accessibility/ax_view_state.h"
|
| +#include "ui/base/ime/input_method.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| #include "ui/events/event.h"
|
| #include "ui/events/keycodes/keyboard_codes.h"
|
| @@ -23,7 +24,6 @@
|
| #include "ui/views/controls/scroll_view.h"
|
| #include "ui/views/controls/textfield/textfield.h"
|
| #include "ui/views/controls/tree/tree_view_controller.h"
|
| -#include "ui/views/ime/input_method.h"
|
|
|
| using ui::TreeModel;
|
| using ui::TreeModelNode;
|
| @@ -98,6 +98,8 @@ TreeView::~TreeView() {
|
| focus_manager_->RemoveFocusChangeListener(this);
|
| focus_manager_ = NULL;
|
| }
|
| + if (GetTextInputClient() && GetInputMethod())
|
| + GetInputMethod()->DetachTextInputClient(GetTextInputClient());
|
| }
|
|
|
| View* TreeView::CreateParentIfNecessary() {
|
| @@ -617,17 +619,19 @@ void TreeView::OnPaint(gfx::Canvas* canvas) {
|
| }
|
|
|
| void TreeView::OnFocus() {
|
| - GetInputMethod()->OnFocus();
|
| + if (GetInputMethod())
|
| + GetInputMethod()->SetFocusedTextInputClient(GetTextInputClient());
|
| View::OnFocus();
|
| SchedulePaintForNode(selected_node_);
|
|
|
| // Notify the InputMethod so that it knows to query the TextInputClient.
|
| if (GetInputMethod())
|
| - GetInputMethod()->OnCaretBoundsChanged(this);
|
| + GetInputMethod()->OnCaretBoundsChanged(GetTextInputClient());
|
| }
|
|
|
| void TreeView::OnBlur() {
|
| - GetInputMethod()->OnBlur();
|
| + if (GetInputMethod())
|
| + GetInputMethod()->DetachTextInputClient(GetTextInputClient());
|
| SchedulePaintForNode(selected_node_);
|
| if (selector_)
|
| selector_->OnViewBlur();
|
|
|