| Index: chrome/browser/chromeos/ui/focus_ring_layer.cc
|
| diff --git a/chrome/browser/chromeos/ui/focus_ring_layer.cc b/chrome/browser/chromeos/ui/focus_ring_layer.cc
|
| index f988578bc2182556391068b0a2aa3df748e5b287..a9754af952be94e57f6855a990fdc413290db871 100644
|
| --- a/chrome/browser/chromeos/ui/focus_ring_layer.cc
|
| +++ b/chrome/browser/chromeos/ui/focus_ring_layer.cc
|
| @@ -29,7 +29,7 @@ const SkColor kShadowColor = SkColorSetRGB(77, 144, 254);
|
| FocusRingLayerDelegate::~FocusRingLayerDelegate() {}
|
|
|
| FocusRingLayer::FocusRingLayer(FocusRingLayerDelegate* delegate)
|
| - : delegate_(delegate), root_window_(nullptr), compositor_(nullptr) {}
|
| + : delegate_(delegate) {}
|
|
|
| FocusRingLayer::~FocusRingLayer() {
|
| if (compositor_ && compositor_->HasAnimationObserver(this))
|
| @@ -52,6 +52,14 @@ void FocusRingLayer::SetOpacity(float opacity) {
|
| layer()->SetOpacity(opacity);
|
| }
|
|
|
| +void FocusRingLayer::SetColor(SkColor color) {
|
| + custom_color_ = color;
|
| +}
|
| +
|
| +void FocusRingLayer::ResetColor() {
|
| + custom_color_.reset();
|
| +}
|
| +
|
| void FocusRingLayer::CreateOrUpdateLayer(aura::Window* root_window,
|
| const char* layer_name,
|
| const gfx::Rect& bounds) {
|
| @@ -92,7 +100,7 @@ void FocusRingLayer::OnPaintLayer(const ui::PaintContext& context) {
|
|
|
| cc::PaintFlags flags;
|
| flags.setAntiAlias(true);
|
| - flags.setColor(kShadowColor);
|
| + flags.setColor(custom_color_ ? *custom_color_ : kShadowColor);
|
| flags.setStyle(cc::PaintFlags::kStroke_Style);
|
| flags.setStrokeWidth(2);
|
|
|
|
|