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

Side by Side Diff: ui/views/focus_border.h

Issue 78803002: Fixing focus highlight on high DPI devices for accessibility (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: found message center offset Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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_FOCUS_BORDER_H_ 5 #ifndef UI_VIEWS_FOCUS_BORDER_H_
6 #define UI_VIEWS_FOCUS_BORDER_H_ 6 #define UI_VIEWS_FOCUS_BORDER_H_
7 7
8 #include "ui/gfx/insets.h"
8 #include "ui/views/views_export.h" 9 #include "ui/views/views_export.h"
9 #include "base/basictypes.h" 10 #include "base/basictypes.h"
10 11
12 typedef unsigned int SkColor;
oshima 2013/11/25 19:22:26 any issue in including skia header?
Mr4D (OOO till 08-26) 2013/11/25 19:35:14 I have no problem with including it. Saw this only
13
11 namespace gfx { 14 namespace gfx {
12 class Canvas; 15 class Canvas;
13 } 16 }
14 17
15 namespace views { 18 namespace views {
16 class View; 19 class View;
17 20
18 //////////////////////////////////////////////////////////////////////////////// 21 ////////////////////////////////////////////////////////////////////////////////
19 // 22 //
20 // Focus border class. 23 // Focus border class.
21 // 24 //
22 // The focus border class is used to display an indication of focus on a view. 25 // 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 26 // 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. 27 // on a view, the focus border is owned by the view.
25 // 28 //
26 //////////////////////////////////////////////////////////////////////////////// 29 ////////////////////////////////////////////////////////////////////////////////
27 30
28 class VIEWS_EXPORT FocusBorder { 31 class VIEWS_EXPORT FocusBorder {
29 public: 32 public:
30 virtual ~FocusBorder(); 33 virtual ~FocusBorder();
31 34
32 // Creates the default inset dashed line focus border. 35 // Creates the default inset dashed line focus border.
33 static FocusBorder* CreateDashedFocusBorder(); 36 static FocusBorder* CreateDashedFocusBorder();
34 static FocusBorder* CreateDashedFocusBorder( 37 static FocusBorder* CreateDashedFocusBorder(
35 int left, int top, int right, int bottom); 38 int left, int top, int right, int bottom);
36 39
40 // Creates a focus border with a given |inset| and |focus_color| which is one
41 // pixel thick.
42 static FocusBorder* CreateSolidFocusBorder(
43 SkColor focus_color, const gfx::Insets& insets);
44
37 // Renders the focus border for the specified view. 45 // Renders the focus border for the specified view.
38 virtual void Paint(const View& view, gfx::Canvas* canvas) const = 0; 46 virtual void Paint(const View& view, gfx::Canvas* canvas) const = 0;
39 47
40 protected: 48 protected:
41 FocusBorder(); 49 FocusBorder();
42 50
43 private: 51 private:
44 DISALLOW_COPY_AND_ASSIGN(FocusBorder); 52 DISALLOW_COPY_AND_ASSIGN(FocusBorder);
45 }; 53 };
46 54
47 } // namespace views 55 } // namespace views
48 56
49 #endif // UI_VIEWS_FOCUS_BORDER_H_ 57 #endif // UI_VIEWS_FOCUS_BORDER_H_
OLDNEW
« no previous file with comments | « ui/views/controls/slider.cc ('k') | ui/views/focus_border.cc » ('j') | ui/views/focus_border.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698