Chromium Code Reviews| Index: ash/sticky_keys/sticky_keys_overlay.h |
| diff --git a/ash/sticky_keys/sticky_keys_overlay.h b/ash/sticky_keys/sticky_keys_overlay.h |
| index 63917941a4c4bfe872d9b88ca35efa0bc5f69513..fd0fab0100abb2e707a831dfdba7ab489cab4579 100644 |
| --- a/ash/sticky_keys/sticky_keys_overlay.h |
| +++ b/ash/sticky_keys/sticky_keys_overlay.h |
| @@ -51,6 +51,10 @@ class ASH_EXPORT StickyKeysOverlay : public ui::LayerAnimationObserver { |
| // animating, the returned value is the target of the animation. |
| bool is_visible() { return is_visible_; } |
| + // Returns the underlying views::Widget for testing purposes. The returned |
| + // widget is owned by StickyKeysOverlay. |
| + views::Widget* GetWidgetForTesting(); |
| + |
| private: |
| // Returns the current bounds of the overlay, which is based on visibility. |
| gfx::Rect CalculateOverlayBounds(); |
| @@ -61,9 +65,10 @@ class ASH_EXPORT StickyKeysOverlay : public ui::LayerAnimationObserver { |
| void OnLayerAnimationScheduled(ui::LayerAnimationSequence* sequence) override; |
| bool is_visible_; |
| + // Note: keep the order the same. |overlay_view_| must outlive |
| + // |overlay_widget_|. |
| + scoped_ptr<StickyKeysOverlayView> overlay_view_; |
|
Jun Mukai
2014/12/04 21:58:55
Why it must outlive?
Tim Song
2014/12/04 23:53:37
Done. This is no longer needed after getting rid o
|
| scoped_ptr<views::Widget> overlay_widget_; |
| - // Ownership of |overlay_view_| is passed to the view heirarchy. |
| - StickyKeysOverlayView* overlay_view_; |
| gfx::Size widget_size_; |
| }; |