OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "content/browser/web_contents/aura/window_slider.h" | 5 #include "content/browser/web_contents/aura/window_slider.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 class CallbackAnimationObserver : public ui::ImplicitAnimationObserver { | 24 class CallbackAnimationObserver : public ui::ImplicitAnimationObserver { |
25 public: | 25 public: |
26 CallbackAnimationObserver(const base::Closure& closure) | 26 CallbackAnimationObserver(const base::Closure& closure) |
27 : closure_(closure) { | 27 : closure_(closure) { |
28 } | 28 } |
29 | 29 |
30 virtual ~CallbackAnimationObserver() {} | 30 virtual ~CallbackAnimationObserver() {} |
31 | 31 |
32 private: | 32 private: |
33 // Overridden from ui::ImplicitAnimationObserver: | 33 // Overridden from ui::ImplicitAnimationObserver: |
34 virtual void OnImplicitAnimationsCompleted() OVERRIDE { | 34 virtual void OnImplicitAnimationsCompleted() override { |
35 if (!closure_.is_null()) | 35 if (!closure_.is_null()) |
36 closure_.Run(); | 36 closure_.Run(); |
37 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 37 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
38 } | 38 } |
39 | 39 |
40 const base::Closure closure_; | 40 const base::Closure closure_; |
41 | 41 |
42 DISALLOW_COPY_AND_ASSIGN(CallbackAnimationObserver); | 42 DISALLOW_COPY_AND_ASSIGN(CallbackAnimationObserver); |
43 }; | 43 }; |
44 | 44 |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 } else if (window == owner_) { | 300 } else if (window == owner_) { |
301 window->RemoveObserver(this); | 301 window->RemoveObserver(this); |
302 owner_ = NULL; | 302 owner_ = NULL; |
303 delete this; | 303 delete this; |
304 } else { | 304 } else { |
305 NOTREACHED(); | 305 NOTREACHED(); |
306 } | 306 } |
307 } | 307 } |
308 | 308 |
309 } // namespace content | 309 } // namespace content |
OLD | NEW |