| OLD | NEW |
| 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 ASH_STICKY_KEYS_STICKY_KEYS_OVERLAY_H_ | 5 #ifndef ASH_STICKY_KEYS_STICKY_KEYS_OVERLAY_H_ |
| 6 #define ASH_STICKY_KEYS_STICKY_KEYS_OVERLAY_H_ | 6 #define ASH_STICKY_KEYS_STICKY_KEYS_OVERLAY_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 9 #include "ash/sticky_keys/sticky_keys_state.h" | 11 #include "ash/sticky_keys/sticky_keys_state.h" |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "ui/compositor/layer_animation_observer.h" | 12 #include "ui/compositor/layer_animation_observer.h" |
| 12 #include "ui/events/event_constants.h" | 13 #include "ui/events/event_constants.h" |
| 13 #include "ui/gfx/geometry/size.h" | 14 #include "ui/gfx/geometry/size.h" |
| 14 | 15 |
| 15 namespace gfx { | 16 namespace gfx { |
| 16 class Rect; | 17 class Rect; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace views { | 20 namespace views { |
| 20 class Widget; | 21 class Widget; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 private: | 59 private: |
| 59 // Returns the current bounds of the overlay, which is based on visibility. | 60 // Returns the current bounds of the overlay, which is based on visibility. |
| 60 gfx::Rect CalculateOverlayBounds(); | 61 gfx::Rect CalculateOverlayBounds(); |
| 61 | 62 |
| 62 // gfx::LayerAnimationObserver overrides: | 63 // gfx::LayerAnimationObserver overrides: |
| 63 void OnLayerAnimationEnded(ui::LayerAnimationSequence* sequence) override; | 64 void OnLayerAnimationEnded(ui::LayerAnimationSequence* sequence) override; |
| 64 void OnLayerAnimationAborted(ui::LayerAnimationSequence* sequence) override; | 65 void OnLayerAnimationAborted(ui::LayerAnimationSequence* sequence) override; |
| 65 void OnLayerAnimationScheduled(ui::LayerAnimationSequence* sequence) override; | 66 void OnLayerAnimationScheduled(ui::LayerAnimationSequence* sequence) override; |
| 66 | 67 |
| 67 bool is_visible_; | 68 bool is_visible_; |
| 68 scoped_ptr<views::Widget> overlay_widget_; | 69 std::unique_ptr<views::Widget> overlay_widget_; |
| 69 scoped_ptr<StickyKeysOverlayView> overlay_view_; | 70 std::unique_ptr<StickyKeysOverlayView> overlay_view_; |
| 70 gfx::Size widget_size_; | 71 gfx::Size widget_size_; |
| 71 }; | 72 }; |
| 72 | 73 |
| 73 } // namespace ash | 74 } // namespace ash |
| 74 | 75 |
| 75 #endif // ASH_STICKY_KEYS_STICKY_KEYS_OVERLAY_H_ | 76 #endif // ASH_STICKY_KEYS_STICKY_KEYS_OVERLAY_H_ |
| OLD | NEW |