| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "views/controls/textfield/textfield.h" | 5 #include "views/controls/textfield/textfield.h" |
| 6 | 6 |
| 7 #include "app/gfx/insets.h" | 7 #include "app/gfx/insets.h" |
| 8 #if defined(OS_WIN) | 8 #if defined(OS_WIN) |
| 9 #include "app/win_util.h" | 9 #include "app/win_util.h" |
| 10 #endif | 10 #endif |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 native_wrapper_ = NativeTextfieldWrapper::CreateWrapper(this); | 245 native_wrapper_ = NativeTextfieldWrapper::CreateWrapper(this); |
| 246 //AddChildView(native_wrapper_->GetView()); | 246 //AddChildView(native_wrapper_->GetView()); |
| 247 // TODO(beng): Move this initialization to NativeTextfieldWin once it | 247 // TODO(beng): Move this initialization to NativeTextfieldWin once it |
| 248 // subclasses NativeControlWin. | 248 // subclasses NativeControlWin. |
| 249 native_wrapper_->UpdateText(); | 249 native_wrapper_->UpdateText(); |
| 250 native_wrapper_->UpdateBackgroundColor(); | 250 native_wrapper_->UpdateBackgroundColor(); |
| 251 native_wrapper_->UpdateReadOnly(); | 251 native_wrapper_->UpdateReadOnly(); |
| 252 native_wrapper_->UpdateFont(); | 252 native_wrapper_->UpdateFont(); |
| 253 native_wrapper_->UpdateEnabled(); | 253 native_wrapper_->UpdateEnabled(); |
| 254 native_wrapper_->UpdateBorder(); | 254 native_wrapper_->UpdateBorder(); |
| 255 |
| 256 // We need to call Layout here because any previous calls to Layout |
| 257 // will have short-circuited and we don't call AddChildView. |
| 258 Layout(); |
| 255 } | 259 } |
| 256 } | 260 } |
| 257 | 261 |
| 258 std::string Textfield::GetClassName() const { | 262 std::string Textfield::GetClassName() const { |
| 259 return kViewClassName; | 263 return kViewClassName; |
| 260 } | 264 } |
| 261 | 265 |
| 262 } // namespace views | 266 } // namespace views |
| OLD | NEW |