| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec
t.h" | 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec
t.h" |
| 9 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h
" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h
" |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
| 11 #include "webkit/tools/test_shell/accessibility_ui_element.h" | 11 #include "webkit/tools/test_shell/accessibility_ui_element.h" |
| 12 | 12 |
| 13 using WebKit::WebCString; | 13 using WebKit::WebCString; |
| 14 using WebKit::WebString; | 14 using WebKit::WebString; |
| 15 using WebKit::WebAccessibilityObject; | 15 using WebKit::WebAccessibilityObject; |
| 16 using WebKit::WebAccessibilityRole; | 16 using WebKit::WebAccessibilityRole; |
| 17 using webkit_glue::CppArgumentList; |
| 18 using webkit_glue::CppVariant; |
| 17 | 19 |
| 18 namespace { | 20 namespace { |
| 19 | 21 |
| 20 // Map role value to string, matching Safari/Mac platform implementation to | 22 // Map role value to string, matching Safari/Mac platform implementation to |
| 21 // avoid rebaselining layout tests. | 23 // avoid rebaselining layout tests. |
| 22 static std::string RoleToString(WebAccessibilityRole role) { | 24 static std::string RoleToString(WebAccessibilityRole role) { |
| 23 std::string result = "AXRole: AX"; | 25 std::string result = "AXRole: AX"; |
| 24 switch (role) { | 26 switch (role) { |
| 25 case WebKit::WebAccessibilityRoleButton: | 27 case WebKit::WebAccessibilityRoleButton: |
| 26 return result.append("Button"); | 28 return result.append("Button"); |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 return element; | 624 return element; |
| 623 } | 625 } |
| 624 | 626 |
| 625 AccessibilityUIElement* AccessibilityUIElementList::CreateRoot( | 627 AccessibilityUIElement* AccessibilityUIElementList::CreateRoot( |
| 626 const WebAccessibilityObject& object) { | 628 const WebAccessibilityObject& object) { |
| 627 AccessibilityUIElement* element = | 629 AccessibilityUIElement* element = |
| 628 new RootAccessibilityUIElement(object, this); | 630 new RootAccessibilityUIElement(object, this); |
| 629 elements_.push_back(element); | 631 elements_.push_back(element); |
| 630 return element; | 632 return element; |
| 631 } | 633 } |
| OLD | NEW |