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

Side by Side Diff: chrome/browser/chromeos/ui/accessibility_focus_ring.h

Issue 602813003: Animate the accessibility focus ring and fix some minor visual issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@focus_ring_in_chromevox
Patch Set: Correct upstream branch Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CHROME_BROWSER_CHROMEOS_UI_ACCESSIBILITY_FOCUS_RING_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_UI_ACCESSIBILITY_FOCUS_RING_H_
6 #define CHROME_BROWSER_CHROMEOS_UI_ACCESSIBILITY_FOCUS_RING_H_ 6 #define CHROME_BROWSER_CHROMEOS_UI_ACCESSIBILITY_FOCUS_RING_H_
7 7
8 #include "ui/gfx/point.h" 8 #include "ui/gfx/point.h"
9 #include "ui/gfx/rect.h" 9 #include "ui/gfx/rect.h"
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // | Last line of paragraph | 65 // | Last line of paragraph |
66 // 24 19 66 // 24 19
67 // | | 67 // | |
68 // 23 22-----------------------21 20 68 // 23 22-----------------------21 20
69 69
70 struct AccessibilityFocusRing { 70 struct AccessibilityFocusRing {
71 // Construct an AccessibilityFocusRing that outlines a rectangular object. 71 // Construct an AccessibilityFocusRing that outlines a rectangular object.
72 static AccessibilityFocusRing CreateWithRect( 72 static AccessibilityFocusRing CreateWithRect(
73 const gfx::Rect& bounds, int margin); 73 const gfx::Rect& bounds, int margin);
74 74
75 // Returns a ring where 0.0 returns r1, 1.0 returns r2, and any number
76 // in-between interpolates linearly between them.
77 static AccessibilityFocusRing Interpolate(
78 const AccessibilityFocusRing& r1,
79 const AccessibilityFocusRing& r2,
80 double fraction);
81
75 // Construct an AccessibilityFocusRing that outlines a paragraph-shaped 82 // Construct an AccessibilityFocusRing that outlines a paragraph-shaped
76 // object. 83 // object.
77 static AccessibilityFocusRing CreateWithParagraphShape( 84 static AccessibilityFocusRing CreateWithParagraphShape(
78 const gfx::Rect& top_line, 85 const gfx::Rect& top_line,
79 const gfx::Rect& body, 86 const gfx::Rect& body,
80 const gfx::Rect& bottom_line, 87 const gfx::Rect& bottom_line,
81 int margin); 88 int margin);
82 89
83 gfx::Point points[36]; 90 gfx::Point points[36];
84 gfx::Rect GetBounds() const; 91 gfx::Rect GetBounds() const;
xiyuan 2014/09/24 19:40:35 nit: Missed from previous review. We should move t
dmazzoni 2014/09/24 21:40:56 Done.
85 }; 92 };
86 93
87 } // namespace chromeos 94 } // namespace chromeos
88 95
89 #endif // CHROME_BROWSER_CHROMEOS_UI_ACCESSIBILITY_FOCUS_RING_H_ 96 #endif // CHROME_BROWSER_CHROMEOS_UI_ACCESSIBILITY_FOCUS_RING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698