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

Unified Diff: ui/views/controls/focusable_border.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/focus_ring.cc ('k') | ui/views/controls/focusable_border.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/focusable_border.h
diff --git a/ui/views/controls/focusable_border.h b/ui/views/controls/focusable_border.h
index fd5084601d97fd4b1fa191dec735c4e09aa260ee..05d6c797197a0ab4285b908336bf17da4eaa6cc9 100644
--- a/ui/views/controls/focusable_border.h
+++ b/ui/views/controls/focusable_border.h
@@ -7,6 +7,8 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
+#include "base/optional.h"
+#include "ui/native_theme/native_theme.h"
#include "ui/views/border.h"
#include "ui/views/view.h"
@@ -28,10 +30,9 @@ class VIEWS_EXPORT FocusableBorder : public Border {
// Sets the insets of the border.
void SetInsets(int top, int left, int bottom, int right);
- // Sets the color of this border.
- void SetColor(SkColor color);
- // Reverts the color of this border to the system default.
- void UseDefaultColor();
+ // Sets the color id to use for this border. When unsupplied, the color will
+ // depend on the focus state.
+ void SetColorId(const base::Optional<ui::NativeTheme::ColorId>& color_id);
// Overridden from Border:
void Paint(const View& view, gfx::Canvas* canvas) override;
@@ -44,12 +45,7 @@ class VIEWS_EXPORT FocusableBorder : public Border {
private:
gfx::Insets insets_;
- // The color to paint the border when |use_default_color_| is false.
- SkColor override_color_;
-
- // Whether the system border color should be used. True unless SetColor has
- // been called.
- bool use_default_color_;
+ base::Optional<ui::NativeTheme::ColorId> override_color_id_;
DISALLOW_COPY_AND_ASSIGN(FocusableBorder);
};
« no previous file with comments | « ui/views/controls/focus_ring.cc ('k') | ui/views/controls/focusable_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698