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

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

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014, Google Inc. All rights reserved. 2 * Copyright (C) 2014, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 18 matching lines...) Expand all
29 #ifndef AXObjectCacheImpl_h 29 #ifndef AXObjectCacheImpl_h
30 #define AXObjectCacheImpl_h 30 #define AXObjectCacheImpl_h
31 31
32 #include "core/dom/AXObjectCache.h" 32 #include "core/dom/AXObjectCache.h"
33 #include "modules/ModulesExport.h" 33 #include "modules/ModulesExport.h"
34 #include "modules/accessibility/AXObject.h" 34 #include "modules/accessibility/AXObject.h"
35 #include "platform/Timer.h" 35 #include "platform/Timer.h"
36 #include "wtf/Forward.h" 36 #include "wtf/Forward.h"
37 #include "wtf/HashMap.h" 37 #include "wtf/HashMap.h"
38 #include "wtf/HashSet.h" 38 #include "wtf/HashSet.h"
39 #include <memory>
39 40
40 namespace blink { 41 namespace blink {
41 42
42 class AbstractInlineTextBox; 43 class AbstractInlineTextBox;
43 class HTMLAreaElement; 44 class HTMLAreaElement;
44 class FrameView; 45 class FrameView;
45 46
46 // This class should only be used from inside the accessibility directory. 47 // This class should only be used from inside the accessibility directory.
47 class MODULES_EXPORT AXObjectCacheImpl : public AXObjectCache { 48 class MODULES_EXPORT AXObjectCacheImpl : public AXObjectCache {
48 WTF_MAKE_NONCOPYABLE(AXObjectCacheImpl); 49 WTF_MAKE_NONCOPYABLE(AXObjectCacheImpl);
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 221
221 // Map from the AXID of any object with an aria-owns attribute to the set of ids 222 // Map from the AXID of any object with an aria-owns attribute to the set of ids
222 // of its children. This is *unvalidated*, it includes ids that may not curr ently 223 // of its children. This is *unvalidated*, it includes ids that may not curr ently
223 // exist in the tree. 224 // exist in the tree.
224 HashMap<AXID, HashSet<String>> m_ariaOwnerToIdsMapping; 225 HashMap<AXID, HashSet<String>> m_ariaOwnerToIdsMapping;
225 226
226 // Map from an ID (the ID attribute of a DOM element) to the set of elements that 227 // Map from an ID (the ID attribute of a DOM element) to the set of elements that
227 // want to own that ID. This is *unvalidated*, it includes possible duplicat es. 228 // want to own that ID. This is *unvalidated*, it includes possible duplicat es.
228 // This is used so that when an element with an ID is added to the tree or c hanges 229 // This is used so that when an element with an ID is added to the tree or c hanges
229 // its ID, we can quickly determine if it affects an aria-owns relationship. 230 // its ID, we can quickly determine if it affects an aria-owns relationship.
230 HashMap<String, OwnPtr<HashSet<AXID>>> m_idToAriaOwnersMapping; 231 HashMap<String, std::unique_ptr<HashSet<AXID>>> m_idToAriaOwnersMapping;
231 232
232 Timer<AXObjectCacheImpl> m_notificationPostTimer; 233 Timer<AXObjectCacheImpl> m_notificationPostTimer;
233 HeapVector<std::pair<Member<AXObject>, AXNotification>> m_notificationsToPos t; 234 HeapVector<std::pair<Member<AXObject>, AXNotification>> m_notificationsToPos t;
234 void notificationPostTimerFired(Timer<AXObjectCacheImpl>*); 235 void notificationPostTimerFired(Timer<AXObjectCacheImpl>*);
235 236
236 AXObject* focusedImageMapUIElement(HTMLAreaElement*); 237 AXObject* focusedImageMapUIElement(HTMLAreaElement*);
237 238
238 AXID getAXID(AXObject*); 239 AXID getAXID(AXObject*);
239 240
240 void textChanged(Node*); 241 void textChanged(Node*);
241 bool nodeIsTextControl(const Node*); 242 bool nodeIsTextControl(const Node*);
242 243
243 Settings* settings(); 244 Settings* settings();
244 }; 245 };
245 246
246 // This is the only subclass of AXObjectCache. 247 // This is the only subclass of AXObjectCache.
247 DEFINE_TYPE_CASTS(AXObjectCacheImpl, AXObjectCache, cache, true, true); 248 DEFINE_TYPE_CASTS(AXObjectCacheImpl, AXObjectCache, cache, true, true);
248 249
249 bool nodeHasRole(Node*, const String& role); 250 bool nodeHasRole(Node*, const String& role);
250 // This will let you know if aria-hidden was explicitly set to false. 251 // This will let you know if aria-hidden was explicitly set to false.
251 bool isNodeAriaVisible(Node*); 252 bool isNodeAriaVisible(Node*);
252 253
253 } // namespace blink 254 } // namespace blink
254 255
255 #endif 256 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698