OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ash/common/wm/overview/scoped_overview_animation_settings_factory.h" | 5 #include "ash/wm/overview/scoped_overview_animation_settings_factory.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace ash { | 9 namespace ash { |
10 | 10 |
11 // static | 11 // static |
12 ScopedOverviewAnimationSettingsFactory* | 12 ScopedOverviewAnimationSettingsFactory* |
13 ScopedOverviewAnimationSettingsFactory::instance_ = nullptr; | 13 ScopedOverviewAnimationSettingsFactory::instance_ = nullptr; |
14 | 14 |
15 // static | 15 // static |
16 ScopedOverviewAnimationSettingsFactory* | 16 ScopedOverviewAnimationSettingsFactory* |
17 ScopedOverviewAnimationSettingsFactory::Get() { | 17 ScopedOverviewAnimationSettingsFactory::Get() { |
18 return instance_; | 18 return instance_; |
19 } | 19 } |
20 | 20 |
21 ScopedOverviewAnimationSettingsFactory:: | 21 ScopedOverviewAnimationSettingsFactory:: |
22 ScopedOverviewAnimationSettingsFactory() { | 22 ScopedOverviewAnimationSettingsFactory() { |
23 DCHECK(!instance_); | 23 DCHECK(!instance_); |
24 instance_ = this; | 24 instance_ = this; |
25 } | 25 } |
26 | 26 |
27 ScopedOverviewAnimationSettingsFactory:: | 27 ScopedOverviewAnimationSettingsFactory:: |
28 ~ScopedOverviewAnimationSettingsFactory() { | 28 ~ScopedOverviewAnimationSettingsFactory() { |
29 DCHECK_EQ(instance_, this); | 29 DCHECK_EQ(instance_, this); |
30 instance_ = nullptr; | 30 instance_ = nullptr; |
31 } | 31 } |
32 | 32 |
33 } // namespace ash | 33 } // namespace ash |
OLD | NEW |