Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: chrome/browser/chromeos/ui/accessibility_cursor_ring_layer.h

Issue 1822823002: Implement Chrome OS accessibility features to highlight focus, caret & cursor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Landing without views_delegate change for now Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 AccessibilityCursorRingLayer(FocusRingLayerDelegate* delegate,
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698