| 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(OS_LINUX) | 7 #if defined(OS_LINUX) |
| 8 #include <gdk/gdkkeysyms.h> | 8 #include <gdk/gdkkeysyms.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 void Textfield::DidGainFocus() { | 345 void Textfield::DidGainFocus() { |
| 346 if (native_wrapper_) | 346 if (native_wrapper_) |
| 347 native_wrapper_->HandleDidGainFocus(); | 347 native_wrapper_->HandleDidGainFocus(); |
| 348 } | 348 } |
| 349 | 349 |
| 350 void Textfield::WillLoseFocus() { | 350 void Textfield::WillLoseFocus() { |
| 351 if (native_wrapper_) | 351 if (native_wrapper_) |
| 352 native_wrapper_->HandleWillLoseFocus(); | 352 native_wrapper_->HandleWillLoseFocus(); |
| 353 } | 353 } |
| 354 | 354 |
| 355 View::ContentType Textfield::GetContentType() const { |
| 356 return View::GENERIC_INPUT; |
| 357 } |
| 358 |
| 355 AccessibilityTypes::Role Textfield::GetAccessibleRole() { | 359 AccessibilityTypes::Role Textfield::GetAccessibleRole() { |
| 356 return AccessibilityTypes::ROLE_TEXT; | 360 return AccessibilityTypes::ROLE_TEXT; |
| 357 } | 361 } |
| 358 | 362 |
| 359 AccessibilityTypes::State Textfield::GetAccessibleState() { | 363 AccessibilityTypes::State Textfield::GetAccessibleState() { |
| 360 int state = 0; | 364 int state = 0; |
| 361 if (read_only()) | 365 if (read_only()) |
| 362 state |= AccessibilityTypes::STATE_READONLY; | 366 state |= AccessibilityTypes::STATE_READONLY; |
| 363 if (IsPassword()) | 367 if (IsPassword()) |
| 364 state |= AccessibilityTypes::STATE_PROTECTED; | 368 state |= AccessibilityTypes::STATE_PROTECTED; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 } | 415 } |
| 412 #endif | 416 #endif |
| 413 } | 417 } |
| 414 } | 418 } |
| 415 | 419 |
| 416 std::string Textfield::GetClassName() const { | 420 std::string Textfield::GetClassName() const { |
| 417 return kViewClassName; | 421 return kViewClassName; |
| 418 } | 422 } |
| 419 | 423 |
| 420 } // namespace views | 424 } // namespace views |
| OLD | NEW |