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

Side by Side Diff: ui/views/controls/focusable_border.h

Issue 2395033002: Harmony - Don't paint focus ring on unless border requests it. (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_CONTROLS_FOCUSABLE_BORDER_H_ 5 #ifndef UI_VIEWS_CONTROLS_FOCUSABLE_BORDER_H_
6 #define UI_VIEWS_CONTROLS_FOCUSABLE_BORDER_H_ 6 #define UI_VIEWS_CONTROLS_FOCUSABLE_BORDER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "ui/views/border.h" 10 #include "ui/views/border.h"
(...skipping 16 matching lines...) Expand all
27 27
28 // Sets the insets of the border. 28 // Sets the insets of the border.
29 void SetInsets(int top, int left, int bottom, int right); 29 void SetInsets(int top, int left, int bottom, int right);
30 30
31 // Sets the color of this border. 31 // Sets the color of this border.
32 void SetColor(SkColor color); 32 void SetColor(SkColor color);
33 // Reverts the color of this border to the system default. 33 // Reverts the color of this border to the system default.
34 void UseDefaultColor(); 34 void UseDefaultColor();
35 35
36 // Overridden from Border: 36 // Overridden from Border:
37 bool ShouldAddFocusRing() const override;
37 void Paint(const View& view, gfx::Canvas* canvas) override; 38 void Paint(const View& view, gfx::Canvas* canvas) override;
38 gfx::Insets GetInsets() const override; 39 gfx::Insets GetInsets() const override;
39 gfx::Size GetMinimumSize() const override; 40 gfx::Size GetMinimumSize() const override;
40 41
41 protected: 42 protected:
42 SkColor GetCurrentColor(const View& view) const; 43 SkColor GetCurrentColor(const View& view) const;
43 44
44 private: 45 private:
45 gfx::Insets insets_; 46 gfx::Insets insets_;
46 47
47 // The color to paint the border when |use_default_color_| is false. 48 // The color to paint the border when |use_default_color_| is false.
48 SkColor override_color_; 49 SkColor override_color_;
49 50
50 // Whether the system border color should be used. True unless SetColor has 51 // Whether the system border color should be used. True unless SetColor has
51 // been called. 52 // been called.
52 bool use_default_color_; 53 bool use_default_color_;
53 54
54 DISALLOW_COPY_AND_ASSIGN(FocusableBorder); 55 DISALLOW_COPY_AND_ASSIGN(FocusableBorder);
55 }; 56 };
56 57
57 } // namespace views 58 } // namespace views
58 59
59 #endif // UI_VIEWS_CONTROLS_FOCUSABLE_BORDER_H_ 60 #endif // UI_VIEWS_CONTROLS_FOCUSABLE_BORDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698