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

Side by Side Diff: ui/views/animation/ink_drop_animation_controller_impl.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_ 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_
6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_ 6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "ui/gfx/geometry/rect.h" 11 #include "ui/gfx/geometry/rect.h"
11 #include "ui/gfx/geometry/size.h" 12 #include "ui/gfx/geometry/size.h"
12 #include "ui/views/animation/ink_drop_animation_controller.h" 13 #include "ui/views/animation/ink_drop_animation_controller.h"
13 #include "ui/views/animation/ink_drop_animation_observer.h" 14 #include "ui/views/animation/ink_drop_animation_observer.h"
14 #include "ui/views/views_export.h" 15 #include "ui/views/views_export.h"
15 16
16 namespace base { 17 namespace base {
17 class Timer; 18 class Timer;
18 } // namespace base 19 } // namespace base
19 20
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // Callback for when the |hover_after_animation_timer_| fires. 87 // Callback for when the |hover_after_animation_timer_| fires.
87 void HoverAfterAnimationTimerFired(); 88 void HoverAfterAnimationTimerFired();
88 89
89 // The host of the ink drop. Used to poll for information such as whether the 90 // The host of the ink drop. Used to poll for information such as whether the
90 // hover should be shown or not. 91 // hover should be shown or not.
91 InkDropHost* ink_drop_host_; 92 InkDropHost* ink_drop_host_;
92 93
93 // The root Layer that parents the InkDropAnimation layers and the 94 // The root Layer that parents the InkDropAnimation layers and the
94 // InkDropHover layers. The |root_layer_| is the one that is added and removed 95 // InkDropHover layers. The |root_layer_| is the one that is added and removed
95 // from the InkDropHost. 96 // from the InkDropHost.
96 scoped_ptr<ui::Layer> root_layer_; 97 std::unique_ptr<ui::Layer> root_layer_;
97 98
98 // The current InkDropHover. Lazily created using CreateInkDropHover(); 99 // The current InkDropHover. Lazily created using CreateInkDropHover();
99 scoped_ptr<InkDropHover> hover_; 100 std::unique_ptr<InkDropHover> hover_;
100 101
101 // Tracks the logical hovered state of |this| as manipulated by the public 102 // Tracks the logical hovered state of |this| as manipulated by the public
102 // SetHovered() function. 103 // SetHovered() function.
103 bool is_hovered_; 104 bool is_hovered_;
104 105
105 // The current InkDropAnimation. Created on demand using 106 // The current InkDropAnimation. Created on demand using
106 // CreateInkDropAnimation(). 107 // CreateInkDropAnimation().
107 scoped_ptr<InkDropAnimation> ink_drop_animation_; 108 std::unique_ptr<InkDropAnimation> ink_drop_animation_;
108 109
109 // The timer used to delay the hover fade in after an ink drop animation. 110 // The timer used to delay the hover fade in after an ink drop animation.
110 scoped_ptr<base::Timer> hover_after_animation_timer_; 111 std::unique_ptr<base::Timer> hover_after_animation_timer_;
111 112
112 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationControllerImpl); 113 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationControllerImpl);
113 }; 114 };
114 115
115 } // namespace views 116 } // namespace views
116 117
117 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_ 118 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698