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

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 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..80021b2b01e0570540e9578c2f3c0ac92af9c0a6 100644
--- a/chrome/browser/chromeos/ui/focus_ring_layer.h
+++ b/chrome/browser/chromeos/ui/focus_ring_layer.h
@@ -39,6 +39,18 @@ class FocusRingLayer : public ui::LayerDelegate {
// the given root window.
void Set(aura::Window* root_window, const gfx::Rect& bounds);
+ 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);
+
+ // The current root window containing the focused object.
+ aura::Window* root_window_;
xiyuan 2014/09/11 21:56:05 nit: Can we keep the members in private section an
dmazzoni 2014/09/11 22:14:39 Done.
+
+ // The current layer.
+ scoped_ptr<ui::Layer> layer_;
+
private:
// ui::LayerDelegate overrides:
virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE;
@@ -50,16 +62,10 @@ class FocusRingLayer : public ui::LayerDelegate {
// The object that owns this layer.
FocusRingLayerDelegate* delegate_;
- // The current root window containing the focused object.
- aura::Window* root_window_;
-
// 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