Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010, 2011 Apple 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 31 typedef unsigned AXID; | 31 typedef unsigned AXID; |
| 32 | 32 |
| 33 namespace blink { | 33 namespace blink { |
| 34 class AXObject; | 34 class AXObject; |
| 35 class AbstractInlineTextBox; | 35 class AbstractInlineTextBox; |
| 36 class FrameView; | 36 class FrameView; |
| 37 class Page; | 37 class Page; |
| 38 class RenderMenuList; | 38 class RenderMenuList; |
| 39 class Widget; | 39 class Widget; |
| 40 | 40 |
| 41 class PublicAXObject { | |
|
dmazzoni
2014/12/09 00:49:50
The problem with this is that it exposes the whole
aboxhall
2014/12/13 01:38:36
I guess I had in mind something like this proposal
| |
| 42 public: | |
| 43 virtual const AtomicString& computedRole() = 0; | |
| 44 virtual const String computedText() = 0; | |
| 45 }; | |
| 46 | |
| 41 class AXObjectCache { | 47 class AXObjectCache { |
| 42 WTF_MAKE_NONCOPYABLE(AXObjectCache); WTF_MAKE_FAST_ALLOCATED; | 48 WTF_MAKE_NONCOPYABLE(AXObjectCache); WTF_MAKE_FAST_ALLOCATED; |
| 43 public: | 49 public: |
| 44 static AXObjectCache* create(Document&); | 50 static AXObjectCache* create(Document&); |
| 45 | 51 |
| 46 static AXObject* focusedUIElementForPage(const Page*); | 52 static AXObject* focusedUIElementForPage(const Page*); |
| 47 | 53 |
| 48 virtual ~AXObjectCache(); | 54 virtual ~AXObjectCache(); |
| 49 | 55 |
| 50 enum AXNotification { | 56 enum AXNotification { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 | 119 |
| 114 // Called when the scroll offset changes. | 120 // Called when the scroll offset changes. |
| 115 virtual void handleScrollPositionChanged(FrameView*) = 0; | 121 virtual void handleScrollPositionChanged(FrameView*) = 0; |
| 116 virtual void handleScrollPositionChanged(RenderObject*) = 0; | 122 virtual void handleScrollPositionChanged(RenderObject*) = 0; |
| 117 | 123 |
| 118 // Called when scroll bars are added / removed (as the view resizes). | 124 // Called when scroll bars are added / removed (as the view resizes). |
| 119 virtual void handleScrollbarUpdate(FrameView*) = 0; | 125 virtual void handleScrollbarUpdate(FrameView*) = 0; |
| 120 virtual void handleLayoutComplete(RenderObject*) = 0; | 126 virtual void handleLayoutComplete(RenderObject*) = 0; |
| 121 virtual void handleScrolledToAnchor(const Node* anchorNode) = 0; | 127 virtual void handleScrolledToAnchor(const Node* anchorNode) = 0; |
| 122 | 128 |
| 129 virtual PublicAXObject* publicAXObjectForNode(Node*) = 0; | |
| 130 | |
| 123 protected: | 131 protected: |
| 124 AXObjectCache(); | 132 AXObjectCache(); |
| 125 }; | 133 }; |
| 126 | 134 |
| 135 class ScopedAXObjectCache { | |
| 136 public: | |
| 137 explicit ScopedAXObjectCache(Document&); | |
| 138 ~ScopedAXObjectCache(); | |
| 139 | |
| 140 AXObjectCache* get(); | |
| 141 AXObjectCache* operator->(); | |
| 142 | |
| 143 private: | |
| 144 | |
| 145 Document& m_document; | |
| 146 AXObjectCache* m_cache; | |
| 147 bool m_isScoped; | |
| 148 }; | |
| 149 | |
| 127 } | 150 } |
| 128 | 151 |
| 129 #endif | 152 #endif |
| OLD | NEW |