OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 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_CURSOR_RING_LAYER_H_ | |
6 #define CHROME_BROWSER_CHROMEOS_UI_ACCESSIBILITY_CURSOR_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 chromeos { | |
12 | |
13 // A subclass of FocusRingLayer that highlights the mouse cursor while it's | |
14 // moving, to make it easier to find visually. | |
15 class AccessibilityCursorRingLayer : public FocusRingLayer { | |
16 public: | |
17 explicit AccessibilityCursorRingLayer(FocusRingLayerDelegate* delegate, | |
xiyuan
2016/03/22 04:34:27
nit: explicit not needed when ctor has >1 args.
dmazzoni
2016/03/22 20:23:02
Done.
| |
18 int red, | |
19 int green, | |
20 int blue); | |
21 ~AccessibilityCursorRingLayer() override; | |
22 | |
23 // Create the layer and update its bounds and position in the hierarchy. | |
24 void Set(const gfx::Point& location); | |
25 | |
26 // Set the layer's opacity. | |
27 void SetOpacity(float opacity); | |
28 | |
29 private: | |
30 // ui::LayerDelegate overrides: | |
31 void OnPaintLayer(const ui::PaintContext& context) override; | |
32 | |
33 // The current location. | |
34 gfx::Point location_; | |
35 | |
36 int red_; | |
37 int green_; | |
38 int blue_; | |
39 | |
40 DISALLOW_COPY_AND_ASSIGN(AccessibilityCursorRingLayer); | |
41 }; | |
42 | |
43 } // namespace chromeos | |
44 | |
45 #endif // CHROME_BROWSER_CHROMEOS_UI_ACCESSIBILITY_CURSOR_RING_LAYER_H_ | |
OLD | NEW |