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

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

Issue 2411693002: views: add focus ring to TreeView (Closed)
Patch Set: move FocusRing support into ScrollView 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
« no previous file with comments | « no previous file | ui/views/controls/scroll_view.h » ('j') | ui/views/controls/scroll_view.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_FOCUS_RING_H_ 5 #ifndef UI_VIEWS_CONTROLS_FOCUS_RING_H_
6 #define UI_VIEWS_CONTROLS_FOCUS_RING_H_ 6 #define UI_VIEWS_CONTROLS_FOCUS_RING_H_
7 7
8 #include "ui/views/view.h" 8 #include "ui/views/view.h"
9 9
10 namespace views { 10 namespace views {
11 11
12 // FocusRing is a View that is designed to act as an indicator of focus for its 12 // FocusRing is a View that is designed to act as an indicator of focus for its
13 // parent. It is a stand-alone view that paints to a layer which extends beyond 13 // parent. It is a stand-alone view that paints to a layer which extends beyond
14 // the bounds of its parent view. 14 // the bounds of its parent view.
15 class FocusRing : public View { 15 class FocusRing : public View {
16 public: 16 public:
17 static const char kViewClassName[];
18
19 FocusRing();
sky 2016/10/12 23:58:01 Move definition to match new position (style guide
Elly Fong-Jones 2016/10/13 11:14:56 Done.
20 ~FocusRing() override;
21
17 // Create a FocusRing and adds it to |parent|. 22 // Create a FocusRing and adds it to |parent|.
18 static void Install(views::View* parent); 23 static void Install(views::View* parent);
19 24
20 // Removes the FocusRing from |parent|. 25 // Removes the FocusRing from |parent|.
21 static void Uninstall(views::View* parent); 26 static void Uninstall(views::View* parent);
22 27
23 // View: 28 // View:
24 const char* GetClassName() const override; 29 const char* GetClassName() const override;
25 bool CanProcessEventsWithinSubtree() const override; 30 bool CanProcessEventsWithinSubtree() const override;
26 void Layout() override; 31 void Layout() override;
27 void OnPaint(gfx::Canvas* canvas) override; 32 void OnPaint(gfx::Canvas* canvas) override;
28 33
29 private: 34 private:
30 static const char kViewClassName[];
31
32 FocusRing();
33 ~FocusRing() override;
34 35
35 DISALLOW_COPY_AND_ASSIGN(FocusRing); 36 DISALLOW_COPY_AND_ASSIGN(FocusRing);
36 }; 37 };
37 38
38 } // views 39 } // views
39 40
40 #endif // UI_VIEWS_CONTROLS_FOCUS_RING_H_ 41 #endif // UI_VIEWS_CONTROLS_FOCUS_RING_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/scroll_view.h » ('j') | ui/views/controls/scroll_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698