| Index: chrome/browser/chromeos/ui/focus_ring_layer.h
|
| diff --git a/chrome/browser/chromeos/ui/focus_ring_layer.h b/chrome/browser/chromeos/ui/focus_ring_layer.h
|
| index 0b178136ae45d11dc8f49706e7ef430aee0ea9a5..83aa396fe2bd95a15548d9606940f0a1683a99cd 100644
|
| --- a/chrome/browser/chromeos/ui/focus_ring_layer.h
|
| +++ b/chrome/browser/chromeos/ui/focus_ring_layer.h
|
| @@ -8,7 +8,9 @@
|
| #include <memory>
|
|
|
| #include "base/macros.h"
|
| +#include "base/optional.h"
|
| #include "base/time/time.h"
|
| +#include "third_party/skia/include/core/SkColor.h"
|
| #include "ui/compositor/compositor_animation_observer.h"
|
| #include "ui/compositor/layer_delegate.h"
|
| #include "ui/gfx/geometry/rect.h"
|
| @@ -52,6 +54,10 @@ class FocusRingLayer : public ui::LayerDelegate,
|
| // Set the layer's opacity.
|
| void SetOpacity(float opacity);
|
|
|
| + // Set a custom color, or reset to the default.
|
| + void SetColor(SkColor color);
|
| + void ResetColor();
|
| +
|
| ui::Layer* layer() { return layer_.get(); }
|
| aura::Window* root_window() { return root_window_; }
|
|
|
| @@ -63,6 +69,9 @@ class FocusRingLayer : public ui::LayerDelegate,
|
| const char* layer_name,
|
| const gfx::Rect& bounds);
|
|
|
| + bool has_custom_color() { return custom_color_.has_value(); }
|
| + SkColor custom_color() { return *custom_color_; }
|
| +
|
| private:
|
| // ui::LayerDelegate overrides:
|
| void OnPaintLayer(const ui::PaintContext& context) override;
|
| @@ -77,7 +86,7 @@ class FocusRingLayer : public ui::LayerDelegate,
|
| FocusRingLayerDelegate* delegate_;
|
|
|
| // The current root window containing the focused object.
|
| - aura::Window* root_window_;
|
| + aura::Window* root_window_ = nullptr;
|
|
|
| // The current layer.
|
| std::unique_ptr<ui::Layer> layer_;
|
| @@ -86,8 +95,10 @@ class FocusRingLayer : public ui::LayerDelegate,
|
| // coordinates.
|
| gfx::Rect focus_ring_;
|
|
|
| + base::Optional<SkColor> custom_color_;
|
| +
|
| // The compositor associated with this layer.
|
| - ui::Compositor* compositor_;
|
| + ui::Compositor* compositor_ = nullptr;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(FocusRingLayer);
|
| };
|
|
|