| Index: content/browser/accessibility/browser_accessibility_manager.h
|
| diff --git a/content/browser/accessibility/browser_accessibility_manager.h b/content/browser/accessibility/browser_accessibility_manager.h
|
| index b87ada2acae46a08991738f1fa5ca309415c1c6a..02652d00b1c0b239cd3f6d9b70ecca7120da2938 100644
|
| --- a/content/browser/accessibility/browser_accessibility_manager.h
|
| +++ b/content/browser/accessibility/browser_accessibility_manager.h
|
| @@ -73,6 +73,7 @@ class CONTENT_EXPORT BrowserAccessibilityDelegate {
|
| virtual gfx::Rect AccessibilityGetViewBounds() const = 0;
|
| virtual gfx::Point AccessibilityOriginInScreen(
|
| const gfx::Rect& bounds) const = 0;
|
| + virtual float AccessibilityGetDeviceScaleFactor() const = 0;
|
| virtual void AccessibilityFatalError() = 0;
|
| virtual gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() = 0;
|
| virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() = 0;
|
| @@ -326,6 +327,7 @@ class CONTENT_EXPORT BrowserAccessibilityManager : public ui::AXTreeDelegate {
|
|
|
| // Accessors.
|
| ui::AXTreeIDRegistry::AXTreeID ax_tree_id() const { return ax_tree_id_; }
|
| + float device_scale_factor() const { return device_scale_factor_; }
|
|
|
| // AXTreeDelegate implementation.
|
| void OnNodeDataWillChange(ui::AXTree* tree,
|
| @@ -363,6 +365,9 @@ class CONTENT_EXPORT BrowserAccessibilityManager : public ui::AXTreeDelegate {
|
| // Get a snapshot of the current tree as an AXTreeUpdate.
|
| ui::AXTreeUpdate SnapshotAXTreeForTesting();
|
|
|
| + // Use a custom device scale factor for testing.
|
| + void UseCustomDeviceScaleFactorForTesting(float device_scale_factor);
|
| +
|
| // Given a point in screen coordinates, trigger an asynchronous hit test
|
| // but return the best possible match instantly.
|
| //
|
| @@ -467,6 +472,14 @@ class CONTENT_EXPORT BrowserAccessibilityManager : public ui::AXTreeDelegate {
|
| // speed so that it can be accessed quickly if it hasn't changed.
|
| int parent_node_id_from_parent_tree_;
|
|
|
| + // The device scale factor for the view associated with this frame,
|
| + // cached each time there's any update to the accessibility tree.
|
| + float device_scale_factor_;
|
| +
|
| + // For testing only: If true, the manually-set device scale factor will be
|
| + // used and it won't be updated from the delegate.
|
| + bool use_custom_device_scale_factor_for_testing_;
|
| +
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager);
|
| };
|
|
|