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

Unified Diff: ui/views/controls/focus_ring.h

Issue 2383243002: Refactor MdFocusRing to make it easier to reuse on other controls. (Closed)
Patch Set: explicit onfocus Created 4 years, 2 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: ui/views/controls/focus_ring.h
diff --git a/ui/views/controls/focus_ring.h b/ui/views/controls/focus_ring.h
new file mode 100644
index 0000000000000000000000000000000000000000..1c2c74c049e7dc0c2a18a0ec69d7f64cdf224647
--- /dev/null
+++ b/ui/views/controls/focus_ring.h
@@ -0,0 +1,26 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
sky 2016/10/03 23:53:15 Don't forget header guards.
Evan Stade 2016/10/04 01:04:55 Done.
+#include "ui/views/view.h"
+
+namespace views {
+
+// FocusRing is a View that is designed to act as an indicator of focus for its
+// parent. It is a stand-alone view that paints to a layer which extends beyond
+// the bounds of its parent view.
+class FocusRing : public View {
+ public:
+ FocusRing();
+ ~FocusRing() override;
+
+ // View:
+ bool CanProcessEventsWithinSubtree() const override;
+ void Layout() override;
+ void OnPaint(gfx::Canvas* canvas) override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(FocusRing);
+};
+
+} // views

Powered by Google App Engine
This is Rietveld 408576698