| 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 CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ |
| 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ | 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 void HitTest(const gfx::Point& point); | 202 void HitTest(const gfx::Point& point); |
| 203 void Increment(const BrowserAccessibility& node); | 203 void Increment(const BrowserAccessibility& node); |
| 204 void ScrollToMakeVisible( | 204 void ScrollToMakeVisible( |
| 205 const BrowserAccessibility& node, gfx::Rect subfocus); | 205 const BrowserAccessibility& node, gfx::Rect subfocus); |
| 206 void ScrollToPoint( | 206 void ScrollToPoint( |
| 207 const BrowserAccessibility& node, gfx::Point point); | 207 const BrowserAccessibility& node, gfx::Point point); |
| 208 void SetFocus(const BrowserAccessibility& node); | 208 void SetFocus(const BrowserAccessibility& node); |
| 209 void SetScrollOffset(const BrowserAccessibility& node, gfx::Point offset); | 209 void SetScrollOffset(const BrowserAccessibility& node, gfx::Point offset); |
| 210 void SetValue( | 210 void SetValue( |
| 211 const BrowserAccessibility& node, const base::string16& value); | 211 const BrowserAccessibility& node, const base::string16& value); |
| 212 void SetSelection( | 212 void SetSelection(ui::AXAbstractRange range); |
| 213 ui::AXRange<AXPlatformPosition::AXPositionInstance::element_type> range); | |
| 214 void SetAccessibilityFocus(const BrowserAccessibility& node); | 213 void SetAccessibilityFocus(const BrowserAccessibility& node); |
| 215 void ShowContextMenu(const BrowserAccessibility& node); | 214 void ShowContextMenu(const BrowserAccessibility& node); |
| 216 | 215 |
| 217 // Retrieve the bounds of the parent View in screen coordinates. | 216 // Retrieve the bounds of the parent View in screen coordinates. |
| 218 virtual gfx::Rect GetViewBounds(); | 217 virtual gfx::Rect GetViewBounds(); |
| 219 | 218 |
| 220 // Fire an event telling native assistive technology to move focus to the | 219 // Fire an event telling native assistive technology to move focus to the |
| 221 // given find in page result. | 220 // given find in page result. |
| 222 void ActivateFindInPageResult(int request_id, int match_index); | 221 void ActivateFindInPageResult(int request_id, int match_index); |
| 223 | 222 |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 // but return the best possible match instantly. | 384 // but return the best possible match instantly. |
| 386 // | 385 // |
| 387 // | 386 // |
| 388 BrowserAccessibility* CachingAsyncHitTest(const gfx::Point& screen_point); | 387 BrowserAccessibility* CachingAsyncHitTest(const gfx::Point& screen_point); |
| 389 | 388 |
| 390 // Called in response to a hover event, caches the result for the next | 389 // Called in response to a hover event, caches the result for the next |
| 391 // call to CachingAsyncHitTest(). | 390 // call to CachingAsyncHitTest(). |
| 392 void CacheHitTestResult(BrowserAccessibility* hit_test_result); | 391 void CacheHitTestResult(BrowserAccessibility* hit_test_result); |
| 393 | 392 |
| 394 protected: | 393 protected: |
| 395 using AXPlatformPositionInstance = AXPlatformPosition::AXPositionInstance; | 394 using AXPlatformPositionInstance = AXPlatformPosition::ConcreteInstance; |
| 396 using AXPlatformRange = ui::AXRange<AXPlatformPositionInstance::element_type>; | 395 using AXPlatformRange = ui::AXRange<AXPlatformPositionInstance::element_type>; |
| 397 | 396 |
| 398 BrowserAccessibilityManager( | 397 BrowserAccessibilityManager( |
| 399 BrowserAccessibilityDelegate* delegate, | 398 BrowserAccessibilityDelegate* delegate, |
| 400 BrowserAccessibilityFactory* factory); | 399 BrowserAccessibilityFactory* factory); |
| 401 | 400 |
| 402 BrowserAccessibilityManager( | 401 BrowserAccessibilityManager( |
| 403 const ui::AXTreeUpdate& initial_tree, | 402 const ui::AXTreeUpdate& initial_tree, |
| 404 BrowserAccessibilityDelegate* delegate, | 403 BrowserAccessibilityDelegate* delegate, |
| 405 BrowserAccessibilityFactory* factory); | 404 BrowserAccessibilityFactory* factory); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 // flakiness. See NeverSuppressOrDelayEventsForTesting() for details. | 501 // flakiness. See NeverSuppressOrDelayEventsForTesting() for details. |
| 503 static bool never_suppress_or_delay_events_for_testing_; | 502 static bool never_suppress_or_delay_events_for_testing_; |
| 504 | 503 |
| 505 private: | 504 private: |
| 506 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); | 505 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); |
| 507 }; | 506 }; |
| 508 | 507 |
| 509 } // namespace content | 508 } // namespace content |
| 510 | 509 |
| 511 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ | 510 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ |
| OLD | NEW |