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

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

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

Powered by Google App Engine
This is Rietveld 408576698