OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
8 #include <gdk/gdkkeysyms.h> | 8 #include <gdk/gdkkeysyms.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 state->state |= ui::AccessibilityTypes::STATE_PROTECTED; | 403 state->state |= ui::AccessibilityTypes::STATE_PROTECTED; |
404 state->value = text_; | 404 state->value = text_; |
405 | 405 |
406 DCHECK(native_wrapper_); | 406 DCHECK(native_wrapper_); |
407 ui::Range range; | 407 ui::Range range; |
408 native_wrapper_->GetSelectedRange(&range); | 408 native_wrapper_->GetSelectedRange(&range); |
409 state->selection_start = range.start(); | 409 state->selection_start = range.start(); |
410 state->selection_end = range.end(); | 410 state->selection_end = range.end(); |
411 } | 411 } |
412 | 412 |
413 ui::TextInputClient* Textfield::GetTextInputClient() { | 413 TextInputClient* Textfield::GetTextInputClient() { |
414 return native_wrapper_ ? native_wrapper_->GetTextInputClient() : NULL; | 414 return native_wrapper_ ? native_wrapper_->GetTextInputClient() : NULL; |
415 } | 415 } |
416 | 416 |
417 void Textfield::OnEnabledChanged() { | 417 void Textfield::OnEnabledChanged() { |
418 View::OnEnabledChanged(); | 418 View::OnEnabledChanged(); |
419 if (native_wrapper_) | 419 if (native_wrapper_) |
420 native_wrapper_->UpdateEnabled(); | 420 native_wrapper_->UpdateEnabled(); |
421 } | 421 } |
422 | 422 |
423 void Textfield::ViewHierarchyChanged(bool is_add, View* parent, View* child) { | 423 void Textfield::ViewHierarchyChanged(bool is_add, View* parent, View* child) { |
(...skipping 20 matching lines...) Expand all Loading... |
444 } | 444 } |
445 #endif | 445 #endif |
446 } | 446 } |
447 } | 447 } |
448 | 448 |
449 std::string Textfield::GetClassName() const { | 449 std::string Textfield::GetClassName() const { |
450 return kViewClassName; | 450 return kViewClassName; |
451 } | 451 } |
452 | 452 |
453 } // namespace views | 453 } // namespace views |
OLD | NEW |