OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROME_BROWSER_CHROMEOS_UI_ACCESSIBILITY_FOCUS_RING_LAYER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_UI_ACCESSIBILITY_FOCUS_RING_LAYER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_UI_ACCESSIBILITY_FOCUS_RING_LAYER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_UI_ACCESSIBILITY_FOCUS_RING_LAYER_H_ |
7 | 7 |
| 8 #include "base/macros.h" |
8 #include "chrome/browser/chromeos/ui/accessibility_focus_ring.h" | 9 #include "chrome/browser/chromeos/ui/accessibility_focus_ring.h" |
9 #include "chrome/browser/chromeos/ui/focus_ring_layer.h" | 10 #include "chrome/browser/chromeos/ui/focus_ring_layer.h" |
10 | 11 |
11 namespace chromeos { | 12 namespace chromeos { |
12 | 13 |
13 // A subclass of FocusRingLayer intended for use by ChromeVox; it supports | 14 // A subclass of FocusRingLayer intended for use by ChromeVox; it supports |
14 // nonrectangular focus rings in order to highlight groups of elements or | 15 // nonrectangular focus rings in order to highlight groups of elements or |
15 // a range of text on a page. | 16 // a range of text on a page. |
16 class AccessibilityFocusRingLayer : public FocusRingLayer { | 17 class AccessibilityFocusRingLayer : public FocusRingLayer { |
17 public: | 18 public: |
18 explicit AccessibilityFocusRingLayer(FocusRingLayerDelegate* delegate); | 19 explicit AccessibilityFocusRingLayer(FocusRingLayerDelegate* delegate); |
19 ~AccessibilityFocusRingLayer() override; | 20 ~AccessibilityFocusRingLayer() override; |
20 | 21 |
21 // Create the layer and update its bounds and position in the hierarchy. | 22 // Create the layer and update its bounds and position in the hierarchy. |
22 void Set(const AccessibilityFocusRing& ring); | 23 void Set(const AccessibilityFocusRing& ring); |
23 | 24 |
24 private: | 25 private: |
25 // ui::LayerDelegate overrides: | 26 // ui::LayerDelegate overrides: |
26 void OnPaintLayer(const ui::PaintContext& context) override; | 27 void OnPaintLayer(const ui::PaintContext& context) override; |
27 | 28 |
28 // The outline of the current focus ring. | 29 // The outline of the current focus ring. |
29 AccessibilityFocusRing ring_; | 30 AccessibilityFocusRing ring_; |
30 | 31 |
31 DISALLOW_COPY_AND_ASSIGN(AccessibilityFocusRingLayer); | 32 DISALLOW_COPY_AND_ASSIGN(AccessibilityFocusRingLayer); |
32 }; | 33 }; |
33 | 34 |
34 } // namespace chromeos | 35 } // namespace chromeos |
35 | 36 |
36 #endif // CHROME_BROWSER_CHROMEOS_UI_ACCESSIBILITY_FOCUS_RING_LAYER_H_ | 37 #endif // CHROME_BROWSER_CHROMEOS_UI_ACCESSIBILITY_FOCUS_RING_LAYER_H_ |
OLD | NEW |