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

Unified Diff: chrome/browser/chromeos/ui/accessibility_focus_ring_controller.h

Issue 2789583004: Add a color argument to accessibilityPrivate.setFocusRing (Closed)
Patch Set: Address feedback Created 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/ui/accessibility_focus_ring_controller.h
diff --git a/chrome/browser/chromeos/ui/accessibility_focus_ring_controller.h b/chrome/browser/chromeos/ui/accessibility_focus_ring_controller.h
index 6eb71726fac4fb9caeb89c6bcd17257c282e0b29..414830dc101e30e5df5aab0917d636dfcab73a67 100644
--- a/chrome/browser/chromeos/ui/accessibility_focus_ring_controller.h
+++ b/chrome/browser/chromeos/ui/accessibility_focus_ring_controller.h
@@ -14,6 +14,7 @@
#include "base/time/time.h"
#include "chrome/browser/chromeos/ui/accessibility_cursor_ring_layer.h"
#include "chrome/browser/chromeos/ui/accessibility_focus_ring_layer.h"
+#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/geometry/rect.h"
namespace chromeos {
@@ -27,6 +28,10 @@ class AccessibilityFocusRingController : public FocusRingLayerDelegate {
enum FocusRingBehavior { FADE_OUT_FOCUS_RING, PERSIST_FOCUS_RING };
+ // Set the focus ring color, or reset it back to the default.
+ void SetFocusRingColor(SkColor color);
+ void ResetFocusRingColor();
+
// Draw a focus ring around the given set of rects, in global screen
// coordinates. Use |focus_ring_behavior| to specify whether the focus
// ring should persist or fade out.
@@ -100,6 +105,8 @@ class AccessibilityFocusRingController : public FocusRingLayerDelegate {
std::vector<AccessibilityFocusRing> focus_rings_;
std::vector<std::unique_ptr<AccessibilityFocusRingLayer>> focus_layers_;
FocusRingBehavior focus_ring_behavior_ = FADE_OUT_FOCUS_RING;
+ bool has_focus_ring_color_ = false;
Devlin 2017/03/30 21:58:05 Drive-by: if you use a base::Optional<SkColor> for
dmazzoni 2017/03/31 20:24:05 Good idea! That's definitely cleaner.
+ SkColor focus_ring_color_ = SK_ColorBLACK;
LayerAnimationInfo cursor_animation_info_;
gfx::Point cursor_location_;

Powered by Google App Engine
This is Rietveld 408576698