| Index: views/controls/textfield/textfield.cc
|
| diff --git a/views/controls/textfield/textfield.cc b/views/controls/textfield/textfield.cc
|
| index 7dfa4daf743ff696df24a3dcf65e9e95b2e41e5f..1d6b078d29ae8e85a7ba9f82f741de42b9676407 100644
|
| --- a/views/controls/textfield/textfield.cc
|
| +++ b/views/controls/textfield/textfield.cc
|
| @@ -244,8 +244,14 @@ void Textfield::UpdateAllProperties() {
|
| }
|
|
|
| void Textfield::SyncText() {
|
| - if (native_wrapper_)
|
| - text_ = native_wrapper_->GetText();
|
| + if (native_wrapper_) {
|
| + string16 new_text = native_wrapper_->GetText();
|
| + if (new_text != text_) {
|
| + text_ = new_text;
|
| + if (controller_)
|
| + controller_->ContentsChanged(this, text_);
|
| + }
|
| + }
|
| }
|
|
|
| bool Textfield::IsIMEComposing() const {
|
| @@ -367,6 +373,10 @@ void Textfield::GetAccessibleState(ui::AccessibleViewState* state) {
|
| state->selection_end = range.end();
|
| }
|
|
|
| +TextInputClient* Textfield::GetTextInputClient() {
|
| + return native_wrapper_ ? native_wrapper_->GetTextInputClient() : NULL;
|
| +}
|
| +
|
| void Textfield::SetEnabled(bool enabled) {
|
| View::SetEnabled(enabled);
|
| if (native_wrapper_)
|
|
|