Fix cookie searchbox bug.
[chromium-blink-merge.git] / ui / views / focus_border.h
blob15a3477883422e906470a992e5247b4988fc16c1
1 // Copyright (c) 2012 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_FOCUS_BORDER_H_
6 #define UI_VIEWS_FOCUS_BORDER_H_
8 #include "ui/views/views_export.h"
9 #include "base/basictypes.h"
11 namespace gfx {
12 class Canvas;
15 namespace views {
16 class View;
18 ////////////////////////////////////////////////////////////////////////////////
20 // Focus border class.
22 // The focus border class is used to display an indication of focus on a view.
23 // To set a focus border on a view, call SetFocusBorder on the view. Once set
24 // on a view, the focus border is owned by the view.
26 ////////////////////////////////////////////////////////////////////////////////
28 class VIEWS_EXPORT FocusBorder {
29 public:
30 virtual ~FocusBorder();
32 // Creates the default inset dashed line focus border.
33 static FocusBorder* CreateDashedFocusBorder();
34 static FocusBorder* CreateDashedFocusBorder(
35 int left, int top, int right, int bottom);
37 // Renders the focus border for the specified view.
38 virtual void Paint(const View& view, gfx::Canvas* canvas) const = 0;
40 protected:
41 FocusBorder();
43 private:
44 DISALLOW_COPY_AND_ASSIGN(FocusBorder);
47 } // namespace views
49 #endif // UI_VIEWS_FOCUS_BORDER_H_