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

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

Issue 2038093003: Refactor accessible focus ring code so the layers are animation observers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@improve_highlights
Patch Set: Created 4 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FOCUS_RING_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_UI_FOCUS_RING_CONTROLLER_H_
6 #define CHROME_BROWSER_CHROMEOS_UI_FOCUS_RING_CONTROLLER_H_ 6 #define CHROME_BROWSER_CHROMEOS_UI_FOCUS_RING_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 19 matching lines...) Expand all
30 public: 30 public:
31 FocusRingController(); 31 FocusRingController();
32 ~FocusRingController() override; 32 ~FocusRingController() override;
33 33
34 // Turns on/off the focus ring. 34 // Turns on/off the focus ring.
35 void SetVisible(bool visible); 35 void SetVisible(bool visible);
36 36
37 private: 37 private:
38 // FocusRingLayerDelegate. 38 // FocusRingLayerDelegate.
39 void OnDeviceScaleFactorChanged() override; 39 void OnDeviceScaleFactorChanged() override;
40 void OnAnimationStep(base::TimeTicks timestamp) override;
40 41
41 // Sets the focused |widget|. 42 // Sets the focused |widget|.
42 void SetWidget(views::Widget* widget); 43 void SetWidget(views::Widget* widget);
43 44
44 // Updates the focus ring to the focused view of |widget_|. If |widget_| is 45 // Updates the focus ring to the focused view of |widget_|. If |widget_| is
45 // NULL or has no focused view, removes the focus ring. Otherwise, draws it. 46 // NULL or has no focused view, removes the focus ring. Otherwise, draws it.
46 void UpdateFocusRing(); 47 void UpdateFocusRing();
47 48
48 // views::WidgetObserver overrides: 49 // views::WidgetObserver overrides:
49 void OnWidgetDestroying(views::Widget* widget) override; 50 void OnWidgetDestroying(views::Widget* widget) override;
(...skipping 13 matching lines...) Expand all
63 64
64 views::Widget* widget_; 65 views::Widget* widget_;
65 std::unique_ptr<FocusRingLayer> focus_ring_layer_; 66 std::unique_ptr<FocusRingLayer> focus_ring_layer_;
66 67
67 DISALLOW_COPY_AND_ASSIGN(FocusRingController); 68 DISALLOW_COPY_AND_ASSIGN(FocusRingController);
68 }; 69 };
69 70
70 } // namespace chromeos 71 } // namespace chromeos
71 72
72 #endif // CHROME_BROWSER_CHROMEOS_UI_FOCUS_RING_CONTROLLER_H_ 73 #endif // CHROME_BROWSER_CHROMEOS_UI_FOCUS_RING_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/ui/accessibility_focus_ring_layer.cc ('k') | chrome/browser/chromeos/ui/focus_ring_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698