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

Side by Side Diff: Source/modules/accessibility/AXObject.h

Issue 1169023003: Oilpan: Prepare moving AccessibilityText to the heap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 5 years, 6 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
« no previous file with comments | « Source/modules/accessibility/AXNodeObject.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nuanti Ltd. 3 * Copyright (C) 2008 Nuanti Ltd.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 AXPressedState, 207 AXPressedState,
208 AXProtectedState, 208 AXProtectedState,
209 AXReadonlyState, 209 AXReadonlyState,
210 AXRequiredState, 210 AXRequiredState,
211 AXSelectableState, 211 AXSelectableState,
212 AXSelectedState, 212 AXSelectedState,
213 AXVerticalState, 213 AXVerticalState,
214 AXVisitedState 214 AXVisitedState
215 }; 215 };
216 216
217 struct AccessibilityText { 217 class AccessibilityText final : public NoBaseWillBeGarbageCollectedFinalized<Acc essibilityText> {
218 String text; 218 public:
219 AccessibilityTextSource textSource; 219 static PassOwnPtrWillBeRawPtr<AccessibilityText> create(const String& text, const AccessibilityTextSource& source)
220 RefPtr<AXObject> textElement; 220 {
221 return adoptPtrWillBeNoop(new AccessibilityText(text, source, nullptr));
222 }
223 static PassOwnPtrWillBeRawPtr<AccessibilityText> create(const String& text, const AccessibilityTextSource& source, const RefPtr<AXObject> element)
224 {
225 return adoptPtrWillBeNoop(new AccessibilityText(text, source, nullptr));
226 }
221 227
222 AccessibilityText(const String& t, const AccessibilityTextSource& s) 228 String text() const { return m_text; }
223 : text(t) 229 AccessibilityTextSource textSource() const { return m_textSource; }
224 , textSource(s) 230 AXObject* textElement() const { return m_textElement.get(); }
231
232 DEFINE_INLINE_TRACE() { }
233
234 private:
235 AccessibilityText(const String& text, const AccessibilityTextSource& source, const PassRefPtr<AXObject> element)
236 : m_text(text)
237 , m_textSource(source)
238 , m_textElement(element)
225 { } 239 { }
226 240
227 AccessibilityText(const String& t, const AccessibilityTextSource& s, const R efPtr<AXObject> element) 241 String m_text;
228 : text(t) 242 AccessibilityTextSource m_textSource;
229 , textSource(s) 243 RefPtr<AXObject> m_textElement;
230 , textElement(element)
231 { }
232 }; 244 };
233 245
234 enum AccessibilityOrientation { 246 enum AccessibilityOrientation {
235 AccessibilityOrientationUndefined = 0, 247 AccessibilityOrientationUndefined = 0,
236 AccessibilityOrientationVertical, 248 AccessibilityOrientationVertical,
237 AccessibilityOrientationHorizontal, 249 AccessibilityOrientationHorizontal,
238 }; 250 };
239 251
240 enum AXObjectInclusion { 252 enum AXObjectInclusion {
241 IncludeObject, 253 IncludeObject,
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 static bool includesARIAWidgetRole(const String&); 807 static bool includesARIAWidgetRole(const String&);
796 static bool hasInteractiveARIAAttribute(const Element&); 808 static bool hasInteractiveARIAAttribute(const Element&);
797 }; 809 };
798 810
799 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ 811 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \
800 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate) 812 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate)
801 813
802 } // namespace blink 814 } // namespace blink
803 815
804 #endif // AXObject_h 816 #endif // AXObject_h
OLDNEW
« no previous file with comments | « Source/modules/accessibility/AXNodeObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698