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

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

Issue 557393003: Introduce AccessibilityFocusRing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@accessibility_private_histograms
Patch Set: Address last feedback Created 6 years, 3 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/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 478b7cc2ec96a51e23d2589097cae60f336bb011..a6e8a60e3c1b11b5902058ece1c68c598f38b83b 100644
--- a/chrome/browser/chromeos/ui/focus_ring_layer.h
+++ b/chrome/browser/chromeos/ui/focus_ring_layer.h
@@ -39,6 +39,14 @@ class FocusRingLayer : public ui::LayerDelegate {
// the given root window.
void Set(aura::Window* root_window, const gfx::Rect& bounds);
+ ui::Layer* layer() { return layer_.get(); }
+
+ protected:
+ // Updates |root_window_| and creates |layer_| if it doesn't exist,
+ // or if the root window has changed. Moves the layer to the top if
+ // it wasn't there already.
+ void CreateOrUpdateLayer(aura::Window* root_window, const char* layer_name);
+
private:
// ui::LayerDelegate overrides:
virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE;
@@ -53,13 +61,13 @@ class FocusRingLayer : public ui::LayerDelegate {
// The current root window containing the focused object.
aura::Window* root_window_;
+ // The current layer.
+ scoped_ptr<ui::Layer> layer_;
+
// The bounding rectangle of the focused object, in |root_window_|
// coordinates.
gfx::Rect focus_ring_;
- // The current layer.
- scoped_ptr<ui::Layer> layer_;
-
DISALLOW_COPY_AND_ASSIGN(FocusRingLayer);
};

Powered by Google App Engine
This is Rietveld 408576698