| 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_LAYER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_UI_FOCUS_RING_LAYER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_UI_FOCUS_RING_LAYER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_UI_FOCUS_RING_LAYER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 ~FocusRingLayer() override; | 42 ~FocusRingLayer() override; |
| 43 | 43 |
| 44 // Move the focus ring layer to the given bounds in the coordinates of | 44 // Move the focus ring layer to the given bounds in the coordinates of |
| 45 // the given root window. | 45 // the given root window. |
| 46 void Set(aura::Window* root_window, const gfx::Rect& bounds); | 46 void Set(aura::Window* root_window, const gfx::Rect& bounds); |
| 47 | 47 |
| 48 // Returns true if this layer is in a composited window with an | 48 // Returns true if this layer is in a composited window with an |
| 49 // animation observer. | 49 // animation observer. |
| 50 bool CanAnimate() const; | 50 bool CanAnimate() const; |
| 51 | 51 |
| 52 // Set the layer's opacity. |
| 53 void SetOpacity(float opacity); |
| 54 |
| 52 ui::Layer* layer() { return layer_.get(); } | 55 ui::Layer* layer() { return layer_.get(); } |
| 53 aura::Window* root_window() { return root_window_; } | 56 aura::Window* root_window() { return root_window_; } |
| 54 | 57 |
| 55 protected: | 58 protected: |
| 56 // Updates |root_window_| and creates |layer_| if it doesn't exist, | 59 // Updates |root_window_| and creates |layer_| if it doesn't exist, |
| 57 // or if the root window has changed. Moves the layer to the top if | 60 // or if the root window has changed. Moves the layer to the top if |
| 58 // it wasn't there already. | 61 // it wasn't there already. |
| 59 void CreateOrUpdateLayer(aura::Window* root_window, | 62 void CreateOrUpdateLayer(aura::Window* root_window, |
| 60 const char* layer_name, | 63 const char* layer_name, |
| 61 const gfx::Rect& bounds); | 64 const gfx::Rect& bounds); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 86 | 89 |
| 87 // The compositor associated with this layer. | 90 // The compositor associated with this layer. |
| 88 ui::Compositor* compositor_; | 91 ui::Compositor* compositor_; |
| 89 | 92 |
| 90 DISALLOW_COPY_AND_ASSIGN(FocusRingLayer); | 93 DISALLOW_COPY_AND_ASSIGN(FocusRingLayer); |
| 91 }; | 94 }; |
| 92 | 95 |
| 93 } // namespace chromeos | 96 } // namespace chromeos |
| 94 | 97 |
| 95 #endif // CHROME_BROWSER_CHROMEOS_UI_FOCUS_RING_LAYER_H_ | 98 #endif // CHROME_BROWSER_CHROMEOS_UI_FOCUS_RING_LAYER_H_ |
| OLD | NEW |