| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |