Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(585)

Side by Side Diff: content/renderer/accessibility/renderer_accessibility.cc

Issue 116293005: Refactor content/ to use ui::AXNodeData instead of blink. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update content/DEPS instead of subdirs Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 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 "content/renderer/accessibility/renderer_accessibility.h" 5 #include "content/renderer/accessibility/renderer_accessibility.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/public/common/content_switches.h" 8 #include "content/public/common/content_switches.h"
9 #include "content/renderer/render_view_impl.h" 9 #include "content/renderer/render_view_impl.h"
10 #include "third_party/WebKit/public/web/WebAXObject.h" 10 #include "third_party/WebKit/public/web/WebAXObject.h"
(...skipping 26 matching lines...) Expand all
37 WebFrame* main_frame = view ? view->mainFrame() : NULL; 37 WebFrame* main_frame = view ? view->mainFrame() : NULL;
38 38
39 if (main_frame) 39 if (main_frame)
40 return main_frame->document(); 40 return main_frame->document();
41 41
42 return WebDocument(); 42 return WebDocument();
43 } 43 }
44 44
45 #ifndef NDEBUG 45 #ifndef NDEBUG
46 const std::string RendererAccessibility::AccessibilityEventToString( 46 const std::string RendererAccessibility::AccessibilityEventToString(
47 blink::WebAXEvent event) { 47 ui::AXEvent event) {
48 switch (event) { 48 switch (event) {
49 case blink::WebAXEventActiveDescendantChanged: 49 case ui::AX_EVENT_ACTIVEDESCENDANTCHANGED:
50 return "active descendant changed"; 50 return "active descendant changed";
51 case blink::WebAXEventAriaAttributeChanged: 51 case ui::AX_EVENT_ARIA_ATTRIBUTE_CHANGED:
52 return "aria attribute changed"; 52 return "aria attribute changed";
53 case blink::WebAXEventAutocorrectionOccured: 53 case ui::AX_EVENT_AUTOCORRECTION_OCCURED:
54 return "autocorrection occurred"; 54 return "autocorrection occurred";
55 case blink::WebAXEventBlur: 55 case ui::AX_EVENT_BLUR:
56 return "blur"; 56 return "blur";
57 case blink::WebAXEventAlert: 57 case ui::AX_EVENT_ALERT:
58 return "alert"; 58 return "alert";
59 case blink::WebAXEventCheckedStateChanged: 59 case ui::AX_EVENT_CHECKED_STATE_CHANGED:
60 return "check state changed"; 60 return "check state changed";
61 case blink::WebAXEventChildrenChanged: 61 case ui::AX_EVENT_CHILDREN_CHANGED:
62 return "children changed"; 62 return "children changed";
63 case blink::WebAXEventFocus: 63 case ui::AX_EVENT_FOCUS:
64 return "focus changed"; 64 return "focus changed";
65 case blink::WebAXEventInvalidStatusChanged: 65 case ui::AX_EVENT_INVALID_STATUS_CHANGED:
66 return "invalid status changed"; 66 return "invalid status changed";
67 case blink::WebAXEventLayoutComplete: 67 case ui::AX_EVENT_LAYOUT_COMPLETE:
68 return "layout complete"; 68 return "layout complete";
69 case blink::WebAXEventLiveRegionChanged: 69 case ui::AX_EVENT_LIVE_REGION_CHANGED:
70 return "live region changed"; 70 return "live region changed";
71 case blink::WebAXEventLoadComplete: 71 case ui::AX_EVENT_LOAD_COMPLETE:
72 return "load complete"; 72 return "load complete";
73 case blink::WebAXEventMenuListItemSelected: 73 case ui::AX_EVENT_MENU_LIST_ITEM_SELECTED:
74 return "menu list item selected"; 74 return "menu list item selected";
75 case blink::WebAXEventMenuListValueChanged: 75 case ui::AX_EVENT_MENU_LIST_VALUE_CHANGED:
76 return "menu list changed"; 76 return "menu list changed";
77 case blink::WebAXEventShow: 77 case ui::AX_EVENT_SHOW:
78 return "object show"; 78 return "object show";
79 case blink::WebAXEventHide: 79 case ui::AX_EVENT_HIDE:
80 return "object hide"; 80 return "object hide";
81 case blink::WebAXEventRowCountChanged: 81 case ui::AX_EVENT_ROW_COUNT_CHANGED:
82 return "row count changed"; 82 return "row count changed";
83 case blink::WebAXEventRowCollapsed: 83 case ui::AX_EVENT_ROW_COLLAPSED:
84 return "row collapsed"; 84 return "row collapsed";
85 case blink::WebAXEventRowExpanded: 85 case ui::AX_EVENT_ROW_EXPANDED:
86 return "row expanded"; 86 return "row expanded";
87 case blink::WebAXEventScrolledToAnchor: 87 case ui::AX_EVENT_SCROLLED_TO_ANCHOR:
88 return "scrolled to anchor"; 88 return "scrolled to anchor";
89 case blink::WebAXEventSelectedChildrenChanged: 89 case ui::AX_EVENT_SELECTED_CHILDREN_CHANGED:
90 return "selected children changed"; 90 return "selected children changed";
91 case blink::WebAXEventSelectedTextChanged: 91 case ui::AX_EVENT_SELECTED_TEXT_CHANGED:
92 return "selected text changed"; 92 return "selected text changed";
93 case blink::WebAXEventTextChanged: 93 case ui::AX_EVENT_TEXT_CHANGED:
94 return "text changed"; 94 return "text changed";
95 case blink::WebAXEventTextInserted: 95 case ui::AX_EVENT_TEXT_INSERTED:
96 return "text inserted"; 96 return "text inserted";
97 case blink::WebAXEventTextRemoved: 97 case ui::AX_EVENT_TEXT_REMOVED:
98 return "text removed"; 98 return "text removed";
99 case blink::WebAXEventValueChanged: 99 case ui::AX_EVENT_VALUE_CHANGED:
100 return "value changed"; 100 return "value changed";
101 default: 101 default:
102 NOTREACHED(); 102 NOTREACHED();
103 } 103 }
104 return ""; 104 return "";
105 } 105 }
106 #endif 106 #endif
107 107
108 } // namespace content 108 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698