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

Side by Side Diff: content/browser/accessibility/browser_accessibility.h

Issue 2964313002: Converts accNavigate over to the AXPlatformNode code. (Closed)
Patch Set: rebase Created 3 years, 5 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 // 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 CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 std::vector<int32_t>* value) const; 285 std::vector<int32_t>* value) const;
286 286
287 // Retrieve the value of a html attribute from the attribute map and 287 // Retrieve the value of a html attribute from the attribute map and
288 // returns true if found. 288 // returns true if found.
289 bool GetHtmlAttribute(const char* attr, std::string* value) const; 289 bool GetHtmlAttribute(const char* attr, std::string* value) const;
290 bool GetHtmlAttribute(const char* attr, base::string16* value) const; 290 bool GetHtmlAttribute(const char* attr, base::string16* value) const;
291 291
292 base::string16 GetFontFamily() const; 292 base::string16 GetFontFamily() const;
293 base::string16 GetLanguage() const; 293 base::string16 GetLanguage() const;
294 294
295 // Returns the table or ARIA grid if inside one.
296 BrowserAccessibility* GetTable() const;
297
298 // If inside a table or ARIA grid, returns the cell found at the given index.
299 // Indices are in row major order and each cell is counted once regardless of
300 // its span.
301 BrowserAccessibility* GetTableCell(int index) const;
302
303 // If inside a table or ARIA grid, returns the cell at the given row and
304 // column (0-based). Works correctly with cells that span multiple rows or
305 // columns.
306 BrowserAccessibility* GetTableCell(int row, int column) const;
307
308 // If inside a table or ARIA grid, returns the zero-based index of the cell.
309 // Indices are in row major order and each cell is counted once regardless of
310 // its span. Returns -1 if the cell is not found or if not inside a table.
311 int GetTableCellIndex() const;
312
313 // If inside a table or ARIA grid, returns the physical column number for the
314 // current cell. In contrast to logical columns, physical columns always start
315 // from 0 and have no gaps in their numbering. Logical columns can be set
316 // using aria-colindex.
317 int GetTableColumn() const;
318
319 // If inside a table or ARIA grid, returns the number of physical columns,
320 // otherwise returns 0.
321 int GetTableColumnCount() const;
322
323 // If inside a table or ARIA grid, returns the number of physical columns that
324 // this cell spans. If not a cell, returns 0.
325 int GetTableColumnSpan() const;
326
327 // If inside a table or ARIA grid, returns the physical row number for the
328 // current cell. In contrast to logical rows, physical rows always start from
329 // 0 and have no gaps in their numbering. Logical rows can be set using
330 // aria-rowindex.
331 int GetTableRow() const;
332
333 // If inside a table or ARIA grid, returns the number of physical rows,
334 // otherwise returns 0.
335 int GetTableRowCount() const;
336
337 // If inside a table or ARIA grid, returns the number of physical rows that
338 // this cell spans. If not a cell, returns 0.
339 int GetTableRowSpan() const;
340
341 virtual base::string16 GetText() const; 295 virtual base::string16 GetText() const;
342 296
343 // Returns true if the bit corresponding to the given enum is 1. 297 // Returns true if the bit corresponding to the given enum is 1.
344 bool HasState(ui::AXState state_enum) const; 298 bool HasState(ui::AXState state_enum) const;
345 bool HasAction(ui::AXAction action_enum) const; 299 bool HasAction(ui::AXAction action_enum) const;
346 300
347 // Returns true if the caret is active on this object. 301 // Returns true if the caret is active on this object.
348 bool HasCaret() const; 302 bool HasCaret() const;
349 303
350 // True if this is a web area, and its grandparent is a presentational iframe. 304 // True if this is a web area, and its grandparent is a presentational iframe.
(...skipping 27 matching lines...) Expand all
378 // AXPlatformNodeDelegate. 332 // AXPlatformNodeDelegate.
379 const ui::AXNodeData& GetData() const override; 333 const ui::AXNodeData& GetData() const override;
380 const ui::AXTreeData& GetTreeData() const override; 334 const ui::AXTreeData& GetTreeData() const override;
381 gfx::NativeWindow GetTopLevelWidget() override; 335 gfx::NativeWindow GetTopLevelWidget() override;
382 gfx::NativeViewAccessible GetParent() override; 336 gfx::NativeViewAccessible GetParent() override;
383 int GetChildCount() override; 337 int GetChildCount() override;
384 gfx::NativeViewAccessible ChildAtIndex(int index) override; 338 gfx::NativeViewAccessible ChildAtIndex(int index) override;
385 gfx::Rect GetScreenBoundsRect() const override; 339 gfx::Rect GetScreenBoundsRect() const override;
386 gfx::NativeViewAccessible HitTestSync(int x, int y) override; 340 gfx::NativeViewAccessible HitTestSync(int x, int y) override;
387 gfx::NativeViewAccessible GetFocus() override; 341 gfx::NativeViewAccessible GetFocus() override;
342 ui::AXPlatformNode* GetFromNodeID(int32_t id) override;
388 gfx::AcceleratedWidget GetTargetForNativeAccessibilityEvent() override; 343 gfx::AcceleratedWidget GetTargetForNativeAccessibilityEvent() override;
389 bool AccessibilityPerformAction(const ui::AXActionData& data) override; 344 bool AccessibilityPerformAction(const ui::AXActionData& data) override;
390 bool ShouldIgnoreHoveredStateForTesting() override; 345 bool ShouldIgnoreHoveredStateForTesting() override;
391 346
392 protected: 347 protected:
393 using AXPlatformPositionInstance = AXPlatformPosition::AXPositionInstance; 348 using AXPlatformPositionInstance = AXPlatformPosition::AXPositionInstance;
394 using AXPlatformRange = ui::AXRange<AXPlatformPositionInstance::element_type>; 349 using AXPlatformRange = ui::AXRange<AXPlatformPositionInstance::element_type>;
395 350
396 BrowserAccessibility(); 351 BrowserAccessibility();
397 352
(...skipping 12 matching lines...) Expand all
410 // special character in the place of every embedded object instead of its 365 // special character in the place of every embedded object instead of its
411 // text, depending on the platform. 366 // text, depending on the platform.
412 base::string16 GetInnerText() const; 367 base::string16 GetInnerText() const;
413 368
414 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); 369 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility);
415 }; 370 };
416 371
417 } // namespace content 372 } // namespace content
418 373
419 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 374 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698