OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_CHROMEOS_UI_ACCESSIBILITY_FOCUS_RING_LAYER_H_ | |
6 #define CHROME_BROWSER_CHROMEOS_UI_ACCESSIBILITY_FOCUS_RING_LAYER_H_ | |
7 | |
8 #include "chrome/browser/chromeos/ui/accessibility_focus_ring.h" | |
9 #include "chrome/browser/chromeos/ui/focus_ring_layer.h" | |
10 | |
11 namespace aura { | |
12 class Window; | |
xiyuan
2014/09/11 03:33:11
nit: not used
dmazzoni
2014/09/11 21:44:39
Done.
| |
13 } | |
14 | |
15 namespace ui { | |
16 class Layer; | |
17 } | |
18 | |
19 namespace chromeos { | |
20 | |
21 // A subclass of FocusRingLayer intended for use by ChromeVox; it supports | |
22 // nonrectangular focus rings in order to highlight groups of elements or | |
23 // a range of text on a page. | |
24 class AccessibilityFocusRingLayer : public FocusRingLayer { | |
25 public: | |
26 explicit AccessibilityFocusRingLayer(FocusRingLayerDelegate* delegate); | |
27 virtual ~AccessibilityFocusRingLayer(); | |
28 | |
29 // Create the layer and update its bounds and position in the hierarchy. | |
30 void Set(const AccessibilityFocusRing& ring); | |
31 | |
32 private: | |
33 // ui::LayerDelegate overrides: | |
34 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; | |
35 | |
36 // The current layer. | |
37 scoped_ptr<ui::Layer> layer_; | |
38 | |
39 // The outline of the current focus ring. | |
40 AccessibilityFocusRing ring_; | |
41 | |
42 DISALLOW_COPY_AND_ASSIGN(AccessibilityFocusRingLayer); | |
43 }; | |
44 | |
45 } // namespace chromeos | |
46 | |
47 #endif // CHROME_BROWSER_CHROMEOS_UI_ACCESSIBILITY_FOCUS_RING_LAYER_H_ | |
OLD | NEW |