[SyncFS] Build indexes from FileTracker entries on disk.
[chromium-blink-merge.git] / ui / views / controls / focusable_border.h
blobbad888e8afb05f0d37a812f3063f6b56f1655e8e
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
3 // found in the LICENSE file.
5 #ifndef UI_VIEWS_CONTROLS_FOCUSABLE_BORDER_H_
6 #define UI_VIEWS_CONTROLS_FOCUSABLE_BORDER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "ui/views/border.h"
11 #include "ui/views/view.h"
13 namespace gfx {
14 class Canvas;
15 class Insets;
18 namespace views {
20 // A Border class to draw a focused border around a field (e.g textfield).
21 class VIEWS_EXPORT FocusableBorder : public Border {
22 public:
23 FocusableBorder();
25 // Sets the insets of the border.
26 void SetInsets(int top, int left, int bottom, int right);
28 // Sets the color of this border.
29 void SetColor(SkColor color);
30 // Reverts the color of this border to the system default.
31 void UseDefaultColor();
33 // Overridden from Border:
34 virtual void Paint(const View& view, gfx::Canvas* canvas) OVERRIDE;
35 virtual gfx::Insets GetInsets() const OVERRIDE;
36 virtual gfx::Size GetMinimumSize() const OVERRIDE;
38 private:
39 gfx::Insets insets_;
41 // The color to paint the border when |use_default_color_| is false.
42 SkColor override_color_;
44 // Whether the system border color should be used. True unless SetColor has
45 // been called.
46 bool use_default_color_;
48 DISALLOW_COPY_AND_ASSIGN(FocusableBorder);
51 } // namespace views
53 #endif // UI_VIEWS_CONTROLS_FOCUSABLE_BORDER_H_