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

Side by Side Diff: public/web/WebAXObject.h

Issue 1053773002: Add WebScopedAXContext to allow a one-time snapshot of accessibility. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update other callers of ScopedAXObjectCache to use RefPtr Created 5 years, 8 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/web/WebAXObject.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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 #include "../platform/WebVector.h" 36 #include "../platform/WebVector.h"
37 #include "WebAXEnums.h" 37 #include "WebAXEnums.h"
38 38
39 #if BLINK_IMPLEMENTATION 39 #if BLINK_IMPLEMENTATION
40 namespace WTF { template <typename T> class PassRefPtr; } 40 namespace WTF { template <typename T> class PassRefPtr; }
41 #endif 41 #endif
42 42
43 namespace blink { 43 namespace blink {
44 44
45 class AXObject; 45 class AXObject;
46 class ScopedAXObjectCache;
47 class WebAXObject;
46 class WebNode; 48 class WebNode;
47 class WebDocument; 49 class WebDocument;
48 class WebString; 50 class WebString;
49 class WebURL; 51 class WebURL;
50 struct WebPoint; 52 struct WebPoint;
51 struct WebRect; 53 struct WebRect;
52 54
55 // An instance of this class, while kept alive, indicates that accessibility
56 // should be temporarily enabled. If accessibility was enabled globally
57 // (WebSettings::setAccessibilityEnabled), this will have no effect.
58 class WebScopedAXContext {
59 public:
60 BLINK_EXPORT WebScopedAXContext(WebDocument& rootDocument);
61 BLINK_EXPORT ~WebScopedAXContext();
62
63 BLINK_EXPORT WebAXObject root() const;
64
65 private:
66 WebPrivatePtr<ScopedAXObjectCache> m_private;
67 };
68
53 // A container for passing around a reference to AXObject. 69 // A container for passing around a reference to AXObject.
54 class WebAXObject { 70 class WebAXObject {
55 public: 71 public:
56 ~WebAXObject() { reset(); } 72 ~WebAXObject() { reset(); }
57 73
58 WebAXObject() { } 74 WebAXObject() { }
59 WebAXObject(const WebAXObject& o) { assign(o); } 75 WebAXObject(const WebAXObject& o) { assign(o); }
60 WebAXObject& operator=(const WebAXObject& o) 76 WebAXObject& operator=(const WebAXObject& o)
61 { 77 {
62 assign(o); 78 assign(o);
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 operator WTF::PassRefPtr<AXObject>() const; 280 operator WTF::PassRefPtr<AXObject>() const;
265 #endif 281 #endif
266 282
267 private: 283 private:
268 WebPrivatePtr<AXObject> m_private; 284 WebPrivatePtr<AXObject> m_private;
269 }; 285 };
270 286
271 } // namespace blink 287 } // namespace blink
272 288
273 #endif 289 #endif
OLDNEW
« no previous file with comments | « Source/web/WebAXObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698