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

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

Issue 2406363003: Update appearance of invalid textfields in Harmony. (Closed)
Patch Set: combine install with setcolorid 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
« no previous file with comments | « ui/views/controls/combobox/combobox.cc ('k') | ui/views/controls/focus_ring.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/focus_ring.h
diff --git a/ui/views/controls/focus_ring.h b/ui/views/controls/focus_ring.h
index 2438bc7b9dd5f215359deddab148669cc2f798a6..c2e6cfdf76c9310c400552fd36253a6e51626150 100644
--- a/ui/views/controls/focus_ring.h
+++ b/ui/views/controls/focus_ring.h
@@ -5,6 +5,8 @@
#ifndef UI_VIEWS_CONTROLS_FOCUS_RING_H_
#define UI_VIEWS_CONTROLS_FOCUS_RING_H_
+#include "base/optional.h"
+#include "ui/native_theme/native_theme.h"
#include "ui/views/view.h"
namespace views {
@@ -14,8 +16,14 @@ namespace views {
// the bounds of its parent view.
class FocusRing : public View {
public:
- // Create a FocusRing and adds it to |parent|.
- static void Install(views::View* parent);
+ static const char kViewClassName[];
+
+ // Create a FocusRing and adds it to |parent|, or updates the one that already
+ // exists. |override_color_id| will be used in place of the default coloration
+ // when provided.
+ static void Install(views::View* parent,
+ ui::NativeTheme::ColorId override_color_id =
+ ui::NativeTheme::kColorId_NumColors);
// Removes the FocusRing from |parent|.
static void Uninstall(views::View* parent);
@@ -27,11 +35,11 @@ class FocusRing : public View {
void OnPaint(gfx::Canvas* canvas) override;
private:
- static const char kViewClassName[];
-
FocusRing();
~FocusRing() override;
+ ui::NativeTheme::ColorId override_color_id_;
+
DISALLOW_COPY_AND_ASSIGN(FocusRing);
};
« no previous file with comments | « ui/views/controls/combobox/combobox.cc ('k') | ui/views/controls/focus_ring.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698