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

Unified Diff: ui/views/controls/combobox/combobox.cc

Issue 23245012: Fix Views Combobox and Tree View text input. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Handle potential NULL from GetInputMethod(). Created 7 years, 4 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 | « no previous file | ui/views/controls/tree/tree_view.cc » ('j') | ui/views/controls/tree/tree_view.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/combobox/combobox.cc
diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc
index 4c107886234848a180f2f8f35f684d9d6307249c..c78c59f599ddeb71f9af3331061a43ce8ce5c2c7 100644
--- a/ui/views/controls/combobox/combobox.cc
+++ b/ui/views/controls/combobox/combobox.cc
@@ -14,6 +14,7 @@
#include "ui/views/controls/combobox/combobox_listener.h"
#include "ui/views/controls/native/native_view_host.h"
#include "ui/views/controls/prefix_selector.h"
+#include "ui/views/ime/input_method.h"
#include "ui/views/widget/widget.h"
namespace views {
@@ -140,6 +141,8 @@ bool Combobox::OnKeyReleased(const ui::KeyEvent& e) {
}
void Combobox::OnFocus() {
+ if (GetInputMethod())
+ GetInputMethod()->OnFocus();
// Forward the focus to the wrapper.
if (native_wrapper_) {
native_wrapper_->SetFocus();
@@ -151,6 +154,8 @@ void Combobox::OnFocus() {
}
void Combobox::OnBlur() {
+ if (GetInputMethod())
+ GetInputMethod()->OnBlur();
if (selector_)
selector_->OnViewBlur();
if (native_wrapper_)
« no previous file with comments | « no previous file | ui/views/controls/tree/tree_view.cc » ('j') | ui/views/controls/tree/tree_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698