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

Unified Diff: ui/keyboard/keyboard_controller.cc

Issue 1094863005: Fix a crash in dtor of CallbackAnimationObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use ref Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_controller.cc
diff --git a/ui/keyboard/keyboard_controller.cc b/ui/keyboard/keyboard_controller.cc
index 5aa44bbbaf599bf7c431ec55456e8e7277092d80..bdb4e425baf78c9e6fbf2ab78a7d1dc8ef4b3c1d 100644
--- a/ui/keyboard/keyboard_controller.cc
+++ b/ui/keyboard/keyboard_controller.cc
@@ -115,7 +115,7 @@ namespace keyboard {
// KeyboardController.
class CallbackAnimationObserver : public ui::LayerAnimationObserver {
public:
- CallbackAnimationObserver(ui::LayerAnimator* animator,
+ CallbackAnimationObserver(const scoped_refptr<ui::LayerAnimator>& animator,
base::Callback<void(void)> callback);
~CallbackAnimationObserver() override;
@@ -125,14 +125,15 @@ class CallbackAnimationObserver : public ui::LayerAnimationObserver {
void OnLayerAnimationAborted(ui::LayerAnimationSequence* seq) override;
void OnLayerAnimationScheduled(ui::LayerAnimationSequence* seq) override {}
- ui::LayerAnimator* animator_;
+ scoped_refptr<ui::LayerAnimator> animator_;
base::Callback<void(void)> callback_;
DISALLOW_COPY_AND_ASSIGN(CallbackAnimationObserver);
};
CallbackAnimationObserver::CallbackAnimationObserver(
- ui::LayerAnimator* animator, base::Callback<void(void)> callback)
+ const scoped_refptr<ui::LayerAnimator>& animator,
+ base::Callback<void(void)> callback)
: animator_(animator), callback_(callback) {
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698