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

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

Issue 1996873002: AXObject is not copyable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more accessibility classes Created 4 years, 7 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
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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 AXProtectedState, 209 AXProtectedState,
210 AXReadonlyState, 210 AXReadonlyState,
211 AXRequiredState, 211 AXRequiredState,
212 AXSelectableState, 212 AXSelectableState,
213 AXSelectedState, 213 AXSelectedState,
214 AXVerticalState, 214 AXVerticalState,
215 AXVisitedState 215 AXVisitedState
216 }; 216 };
217 217
218 class AccessibilityText final : public GarbageCollectedFinalized<AccessibilityTe xt> { 218 class AccessibilityText final : public GarbageCollectedFinalized<AccessibilityTe xt> {
219 WTF_MAKE_NONCOPYABLE(AccessibilityText);
220
219 public: 221 public:
220 DEFINE_INLINE_TRACE() 222 DEFINE_INLINE_TRACE()
221 { 223 {
222 visitor->trace(m_textElement); 224 visitor->trace(m_textElement);
223 } 225 }
224 226
225 private: 227 private:
226 AccessibilityText(const String& text, const AccessibilityTextSource& source, AXObject* element) 228 AccessibilityText(const String& text, const AccessibilityTextSource& source, AXObject* element)
227 : m_text(text) 229 : m_text(text)
228 , m_textElement(element) 230 , m_textElement(element)
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 , relatedObject(obj) 386 , relatedObject(obj)
385 { } 387 { }
386 388
387 DEFINE_INLINE_TRACE() 389 DEFINE_INLINE_TRACE()
388 { 390 {
389 visitor->trace(relatedObject); 391 visitor->trace(relatedObject);
390 } 392 }
391 }; 393 };
392 394
393 class NameSourceRelatedObject : public GarbageCollectedFinalized<NameSourceRelat edObject> { 395 class NameSourceRelatedObject : public GarbageCollectedFinalized<NameSourceRelat edObject> {
396 WTF_MAKE_NONCOPYABLE(NameSourceRelatedObject);
397
394 public: 398 public:
395 WeakMember<AXObject> object; 399 WeakMember<AXObject> object;
396 String text; 400 String text;
397 401
398 NameSourceRelatedObject(AXObject* object, String text) 402 NameSourceRelatedObject(AXObject* object, String text)
399 : object(object) 403 : object(object)
400 , text(text) 404 , text(text)
401 { 405 {
402 } 406 }
403 407
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 { 466 {
463 } 467 }
464 468
465 DEFINE_INLINE_TRACE() 469 DEFINE_INLINE_TRACE()
466 { 470 {
467 visitor->trace(relatedObjects); 471 visitor->trace(relatedObjects);
468 } 472 }
469 }; 473 };
470 474
471 class MODULES_EXPORT AXObject : public GarbageCollectedFinalized<AXObject> { 475 class MODULES_EXPORT AXObject : public GarbageCollectedFinalized<AXObject> {
476 WTF_MAKE_NONCOPYABLE(AXObject);
472 public: 477 public:
473 typedef HeapVector<Member<AXObject>> AXObjectVector; 478 typedef HeapVector<Member<AXObject>> AXObjectVector;
474 479
475 struct AXRange { 480 struct AXRange {
476 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 481 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
477 // The deepest descendant in which the range starts. 482 // The deepest descendant in which the range starts.
478 // (nullptr means the current object.) 483 // (nullptr means the current object.)
479 Persistent<AXObject> anchorObject; 484 Persistent<AXObject> anchorObject;
480 // The number of characters and child objects in the anchor object 485 // The number of characters and child objects in the anchor object
481 // before the range starts. 486 // before the range starts.
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ 975 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \
971 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate) 976 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate)
972 977
973 } // namespace blink 978 } // namespace blink
974 979
975 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::IgnoredReason); 980 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::IgnoredReason);
976 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::NameSource); 981 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::NameSource);
977 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::DescriptionSource); 982 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::DescriptionSource);
978 983
979 #endif // AXObject_h 984 #endif // AXObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698