OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "third_party/WebKit/WebKit/chromium/public/WebAccessibilityObject.h" | 5 #include "third_party/WebKit/WebKit/chromium/public/WebAccessibilityObject.h" |
6 #include "third_party/WebKit/WebKit/chromium/public/WebCString.h" | 6 #include "third_party/WebKit/WebKit/chromium/public/WebCString.h" |
7 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" | 7 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" |
8 #include "webkit/glue/glue_util.h" | 8 #include "webkit/glue/glue_util.h" |
9 #include "webkit/tools/test_shell/accessibility_ui_element.h" | 9 #include "webkit/tools/test_shell/accessibility_ui_element.h" |
10 | 10 |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 BindProperty("intValue", &int_value_); | 292 BindProperty("intValue", &int_value_); |
293 BindProperty("minValue", &min_value_); | 293 BindProperty("minValue", &min_value_); |
294 BindProperty("maxValue", &max_value_); | 294 BindProperty("maxValue", &max_value_); |
295 BindProperty("childrenCount", | 295 BindProperty("childrenCount", |
296 &AccessibilityUIElement::ChildrenCountGetterCallback); | 296 &AccessibilityUIElement::ChildrenCountGetterCallback); |
297 BindProperty("insertionPointLineNumber", &insertion_point_line_number_); | 297 BindProperty("insertionPointLineNumber", &insertion_point_line_number_); |
298 BindProperty("selectedTextRange", &selected_text_range); | 298 BindProperty("selectedTextRange", &selected_text_range); |
299 BindProperty("isEnabled", &AccessibilityUIElement::IsEnabledGetterCallback); | 299 BindProperty("isEnabled", &AccessibilityUIElement::IsEnabledGetterCallback); |
300 BindProperty("isRequired", &is_required_); | 300 BindProperty("isRequired", &is_required_); |
301 BindProperty("isSelected", &AccessibilityUIElement::IsSelectedGetterCallback); | 301 BindProperty("isSelected", &AccessibilityUIElement::IsSelectedGetterCallback); |
| 302 BindProperty("isChecked", &AccessibilityUIElement::IsCheckedGetterCallback); |
302 BindProperty("valueDescription", &value_description_); | 303 BindProperty("valueDescription", &value_description_); |
303 | 304 |
304 BindFallbackMethod(&AccessibilityUIElement::FallbackCallback); | 305 BindFallbackMethod(&AccessibilityUIElement::FallbackCallback); |
305 } | 306 } |
306 | 307 |
307 AccessibilityUIElement* AccessibilityUIElement::GetChildAtIndex( | 308 AccessibilityUIElement* AccessibilityUIElement::GetChildAtIndex( |
308 unsigned index) { | 309 unsigned index) { |
309 return factory_->Create(accessibility_object().childAt(index)); | 310 return factory_->Create(accessibility_object().childAt(index)); |
310 } | 311 } |
311 | 312 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 } | 496 } |
496 | 497 |
497 void AccessibilityUIElement::IsEnabledGetterCallback(CppVariant* result) { | 498 void AccessibilityUIElement::IsEnabledGetterCallback(CppVariant* result) { |
498 result->Set(accessibility_object().isEnabled()); | 499 result->Set(accessibility_object().isEnabled()); |
499 } | 500 } |
500 | 501 |
501 void AccessibilityUIElement::IsSelectedGetterCallback(CppVariant* result) { | 502 void AccessibilityUIElement::IsSelectedGetterCallback(CppVariant* result) { |
502 result->SetNull(); | 503 result->SetNull(); |
503 } | 504 } |
504 | 505 |
| 506 void AccessibilityUIElement::IsCheckedGetterCallback(CppVariant* result) { |
| 507 result->Set(accessibility_object().isChecked()); |
| 508 } |
| 509 |
505 void AccessibilityUIElement::RoleGetterCallback(CppVariant* result) { | 510 void AccessibilityUIElement::RoleGetterCallback(CppVariant* result) { |
506 result->Set(GetRole(accessibility_object())); | 511 result->Set(GetRole(accessibility_object())); |
507 } | 512 } |
508 | 513 |
509 void AccessibilityUIElement::TitleGetterCallback(CppVariant* result) { | 514 void AccessibilityUIElement::TitleGetterCallback(CppVariant* result) { |
510 result->Set(GetTitle(accessibility_object())); | 515 result->Set(GetTitle(accessibility_object())); |
511 } | 516 } |
512 | 517 |
513 | 518 |
514 RootAccessibilityUIElement::RootAccessibilityUIElement( | 519 RootAccessibilityUIElement::RootAccessibilityUIElement( |
(...skipping 29 matching lines...) Expand all Loading... |
544 return element; | 549 return element; |
545 } | 550 } |
546 | 551 |
547 AccessibilityUIElement* AccessibilityUIElementList::CreateRoot( | 552 AccessibilityUIElement* AccessibilityUIElementList::CreateRoot( |
548 const WebAccessibilityObject& object) { | 553 const WebAccessibilityObject& object) { |
549 AccessibilityUIElement* element = | 554 AccessibilityUIElement* element = |
550 new RootAccessibilityUIElement(object, this); | 555 new RootAccessibilityUIElement(object, this); |
551 elements_.push_back(element); | 556 elements_.push_back(element); |
552 return element; | 557 return element; |
553 } | 558 } |
OLD | NEW |