| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/shell/renderer/test_runner/web_ax_object_proxy.h" | 5 #include "content/shell/renderer/test_runner/web_ax_object_proxy.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "gin/handle.h" | 8 #include "gin/handle.h" |
| 9 #include "third_party/WebKit/public/platform/WebPoint.h" | 9 #include "third_party/WebKit/public/platform/WebPoint.h" |
| 10 #include "third_party/WebKit/public/platform/WebRect.h" | 10 #include "third_party/WebKit/public/platform/WebRect.h" |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 .SetProperty("isCollapsed", &WebAXObjectProxy::IsCollapsed) | 496 .SetProperty("isCollapsed", &WebAXObjectProxy::IsCollapsed) |
| 497 .SetProperty("hasPopup", &WebAXObjectProxy::HasPopup) | 497 .SetProperty("hasPopup", &WebAXObjectProxy::HasPopup) |
| 498 .SetProperty("isValid", &WebAXObjectProxy::IsValid) | 498 .SetProperty("isValid", &WebAXObjectProxy::IsValid) |
| 499 .SetProperty("isReadOnly", &WebAXObjectProxy::IsReadOnly) | 499 .SetProperty("isReadOnly", &WebAXObjectProxy::IsReadOnly) |
| 500 .SetProperty("orientation", &WebAXObjectProxy::Orientation) | 500 .SetProperty("orientation", &WebAXObjectProxy::Orientation) |
| 501 .SetProperty("clickPointX", &WebAXObjectProxy::ClickPointX) | 501 .SetProperty("clickPointX", &WebAXObjectProxy::ClickPointX) |
| 502 .SetProperty("clickPointY", &WebAXObjectProxy::ClickPointY) | 502 .SetProperty("clickPointY", &WebAXObjectProxy::ClickPointY) |
| 503 .SetProperty("rowCount", &WebAXObjectProxy::RowCount) | 503 .SetProperty("rowCount", &WebAXObjectProxy::RowCount) |
| 504 .SetProperty("columnCount", &WebAXObjectProxy::ColumnCount) | 504 .SetProperty("columnCount", &WebAXObjectProxy::ColumnCount) |
| 505 .SetProperty("isClickable", &WebAXObjectProxy::IsClickable) | 505 .SetProperty("isClickable", &WebAXObjectProxy::IsClickable) |
| 506 .SetProperty("isButtonStateMixed", &WebAXObjectProxy::IsButtonStateMixed) |
| 506 .SetMethod("allAttributes", &WebAXObjectProxy::AllAttributes) | 507 .SetMethod("allAttributes", &WebAXObjectProxy::AllAttributes) |
| 507 .SetMethod("attributesOfChildren", | 508 .SetMethod("attributesOfChildren", |
| 508 &WebAXObjectProxy::AttributesOfChildren) | 509 &WebAXObjectProxy::AttributesOfChildren) |
| 509 .SetMethod("lineForIndex", &WebAXObjectProxy::LineForIndex) | 510 .SetMethod("lineForIndex", &WebAXObjectProxy::LineForIndex) |
| 510 .SetMethod("boundsForRange", &WebAXObjectProxy::BoundsForRange) | 511 .SetMethod("boundsForRange", &WebAXObjectProxy::BoundsForRange) |
| 511 .SetMethod("childAtIndex", &WebAXObjectProxy::ChildAtIndex) | 512 .SetMethod("childAtIndex", &WebAXObjectProxy::ChildAtIndex) |
| 512 .SetMethod("elementAtPoint", &WebAXObjectProxy::ElementAtPoint) | 513 .SetMethod("elementAtPoint", &WebAXObjectProxy::ElementAtPoint) |
| 513 .SetMethod("tableHeader", &WebAXObjectProxy::TableHeader) | 514 .SetMethod("tableHeader", &WebAXObjectProxy::TableHeader) |
| 514 .SetMethod("rowIndexRange", &WebAXObjectProxy::RowIndexRange) | 515 .SetMethod("rowIndexRange", &WebAXObjectProxy::RowIndexRange) |
| 515 .SetMethod("columnIndexRange", &WebAXObjectProxy::ColumnIndexRange) | 516 .SetMethod("columnIndexRange", &WebAXObjectProxy::ColumnIndexRange) |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 int32_t WebAXObjectProxy::ColumnCount() { | 791 int32_t WebAXObjectProxy::ColumnCount() { |
| 791 accessibility_object_.updateLayoutAndCheckValidity(); | 792 accessibility_object_.updateLayoutAndCheckValidity(); |
| 792 return static_cast<int32_t>(accessibility_object_.columnCount()); | 793 return static_cast<int32_t>(accessibility_object_.columnCount()); |
| 793 } | 794 } |
| 794 | 795 |
| 795 bool WebAXObjectProxy::IsClickable() { | 796 bool WebAXObjectProxy::IsClickable() { |
| 796 accessibility_object_.updateLayoutAndCheckValidity(); | 797 accessibility_object_.updateLayoutAndCheckValidity(); |
| 797 return accessibility_object_.isClickable(); | 798 return accessibility_object_.isClickable(); |
| 798 } | 799 } |
| 799 | 800 |
| 801 bool WebAXObjectProxy::IsButtonStateMixed() { |
| 802 accessibility_object_.updateLayoutAndCheckValidity(); |
| 803 return accessibility_object_.isButtonStateMixed(); |
| 804 } |
| 805 |
| 800 std::string WebAXObjectProxy::AllAttributes() { | 806 std::string WebAXObjectProxy::AllAttributes() { |
| 801 accessibility_object_.updateLayoutAndCheckValidity(); | 807 accessibility_object_.updateLayoutAndCheckValidity(); |
| 802 return GetAttributes(accessibility_object_); | 808 return GetAttributes(accessibility_object_); |
| 803 } | 809 } |
| 804 | 810 |
| 805 std::string WebAXObjectProxy::AttributesOfChildren() { | 811 std::string WebAXObjectProxy::AttributesOfChildren() { |
| 806 accessibility_object_.updateLayoutAndCheckValidity(); | 812 accessibility_object_.updateLayoutAndCheckValidity(); |
| 807 AttributesCollector collector; | 813 AttributesCollector collector; |
| 808 unsigned size = accessibility_object_.childCount(); | 814 unsigned size = accessibility_object_.childCount(); |
| 809 for (unsigned i = 0; i < size; ++i) | 815 for (unsigned i = 0; i < size; ++i) |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1096 v8::Handle<v8::Value> value_handle = gin::CreateHandle( | 1102 v8::Handle<v8::Value> value_handle = gin::CreateHandle( |
| 1097 isolate, new RootWebAXObjectProxy(object, this)).ToV8(); | 1103 isolate, new RootWebAXObjectProxy(object, this)).ToV8(); |
| 1098 if (value_handle.IsEmpty()) | 1104 if (value_handle.IsEmpty()) |
| 1099 return v8::Handle<v8::Object>(); | 1105 return v8::Handle<v8::Object>(); |
| 1100 v8::Handle<v8::Object> handle = value_handle->ToObject(isolate); | 1106 v8::Handle<v8::Object> handle = value_handle->ToObject(isolate); |
| 1101 elements_.Append(handle); | 1107 elements_.Append(handle); |
| 1102 return handle; | 1108 return handle; |
| 1103 } | 1109 } |
| 1104 | 1110 |
| 1105 } // namespace content | 1111 } // namespace content |
| OLD | NEW |