OLD | NEW |
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/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "ui/views/border.h" | 10 #include "ui/views/border.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 } | 31 } |
32 | 32 |
33 // Sets the color of this border. | 33 // Sets the color of this border. |
34 void SetColor(SkColor color); | 34 void SetColor(SkColor color); |
35 // Reverts the color of this border to the system default. | 35 // Reverts the color of this border to the system default. |
36 void UseDefaultColor(); | 36 void UseDefaultColor(); |
37 | 37 |
38 // Overridden from Border: | 38 // Overridden from Border: |
39 virtual void Paint(const View& view, gfx::Canvas* canvas) OVERRIDE; | 39 virtual void Paint(const View& view, gfx::Canvas* canvas) OVERRIDE; |
40 virtual gfx::Insets GetInsets() const OVERRIDE; | 40 virtual gfx::Insets GetInsets() const OVERRIDE; |
| 41 virtual gfx::Size GetMinimumSize() const OVERRIDE; |
41 | 42 |
42 private: | 43 private: |
43 bool has_focus_; | 44 bool has_focus_; |
44 gfx::Insets insets_; | 45 gfx::Insets insets_; |
45 | 46 |
46 // The color to paint the border when |use_default_color_| is false. | 47 // The color to paint the border when |use_default_color_| is false. |
47 SkColor override_color_; | 48 SkColor override_color_; |
48 | 49 |
49 // Whether the system border color should be used. True unless SetColor has | 50 // Whether the system border color should be used. True unless SetColor has |
50 // been called. | 51 // been called. |
51 bool use_default_color_; | 52 bool use_default_color_; |
52 | 53 |
53 DISALLOW_COPY_AND_ASSIGN(FocusableBorder); | 54 DISALLOW_COPY_AND_ASSIGN(FocusableBorder); |
54 }; | 55 }; |
55 | 56 |
56 } // namespace views | 57 } // namespace views |
57 | 58 |
58 #endif // UI_VIEWS_CONTROLS_FOCUSABLE_BORDER_H_ | 59 #endif // UI_VIEWS_CONTROLS_FOCUSABLE_BORDER_H_ |
OLD | NEW |