| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_GLUE_WEBACCESSIBILITY_H_ | 5 #ifndef WEBKIT_GLUE_WEBACCESSIBILITY_H_ |
| 6 #define WEBKIT_GLUE_WEBACCESSIBILITY_H_ | 6 #define WEBKIT_GLUE_WEBACCESSIBILITY_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 // Empty constructor, for serialization. | 252 // Empty constructor, for serialization. |
| 253 WebAccessibility(); | 253 WebAccessibility(); |
| 254 | 254 |
| 255 // Construct from a WebAccessibilityObject. Recursively creates child | 255 // Construct from a WebAccessibilityObject. Recursively creates child |
| 256 // nodes as needed to complete the tree. | 256 // nodes as needed to complete the tree. |
| 257 WebAccessibility(const WebKit::WebAccessibilityObject& src, | 257 WebAccessibility(const WebKit::WebAccessibilityObject& src, |
| 258 bool include_children); | 258 bool include_children); |
| 259 | 259 |
| 260 ~WebAccessibility(); | 260 ~WebAccessibility(); |
| 261 | 261 |
| 262 // Initialize an already-created struct, same as the constructor above. |
| 263 void Init(const WebKit::WebAccessibilityObject& src, |
| 264 bool include_children); |
| 265 |
| 262 #ifndef NDEBUG | 266 #ifndef NDEBUG |
| 263 std::string DebugString(bool recursive, | 267 std::string DebugString(bool recursive, |
| 264 int render_routing_id, | 268 int render_routing_id, |
| 265 int notification_type) const; | 269 int notification_type) const; |
| 266 #endif | 270 #endif |
| 267 | 271 |
| 268 private: | 272 private: |
| 269 // Initialize an already-created struct, same as the constructor above. | |
| 270 void Init(const WebKit::WebAccessibilityObject& src, | |
| 271 bool include_children); | |
| 272 | |
| 273 // Returns true if |ancestor| is the first unignored parent of |child|, | 273 // Returns true if |ancestor| is the first unignored parent of |child|, |
| 274 // which means that when walking up the parent chain from |child|, | 274 // which means that when walking up the parent chain from |child|, |
| 275 // |ancestor| is the *first* ancestor that isn't marked as | 275 // |ancestor| is the *first* ancestor that isn't marked as |
| 276 // accessibilityIsIgnored(). | 276 // accessibilityIsIgnored(). |
| 277 bool IsParentUnignoredOf(const WebKit::WebAccessibilityObject& ancestor, | 277 bool IsParentUnignoredOf(const WebKit::WebAccessibilityObject& ancestor, |
| 278 const WebKit::WebAccessibilityObject& child); | 278 const WebKit::WebAccessibilityObject& child); |
| 279 | 279 |
| 280 public: | 280 public: |
| 281 // This is a simple serializable struct. All member variables should be | 281 // This is a simple serializable struct. All member variables should be |
| 282 // copyable. | 282 // copyable. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 301 std::vector<int32> cell_ids; | 301 std::vector<int32> cell_ids; |
| 302 | 302 |
| 303 // For a table, the unique cell ids in row-major order of their first | 303 // For a table, the unique cell ids in row-major order of their first |
| 304 // occurrence. | 304 // occurrence. |
| 305 std::vector<int32> unique_cell_ids; | 305 std::vector<int32> unique_cell_ids; |
| 306 }; | 306 }; |
| 307 | 307 |
| 308 } // namespace webkit_glue | 308 } // namespace webkit_glue |
| 309 | 309 |
| 310 #endif // WEBKIT_GLUE_WEBACCESSIBILITY_H_ | 310 #endif // WEBKIT_GLUE_WEBACCESSIBILITY_H_ |
| OLD | NEW |