| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "ui/views/widget/desktop_aura/desktop_factory_ozone.h" | 5 #include "ui/views/widget/desktop_aura/desktop_factory_ozone.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace views { | 9 namespace views { |
| 10 | 10 |
| 11 // static | 11 // static |
| 12 DesktopFactoryOzone* DesktopFactoryOzone::impl_ = NULL; | 12 DesktopFactoryOzone* DesktopFactoryOzone::impl_ = NULL; |
| 13 | 13 |
| 14 DesktopFactoryOzone::DesktopFactoryOzone() { | 14 DesktopFactoryOzone::DesktopFactoryOzone() { |
| 15 } | 15 } |
| 16 | 16 |
| 17 DesktopFactoryOzone::~DesktopFactoryOzone() { | 17 DesktopFactoryOzone::~DesktopFactoryOzone() { |
| 18 } | 18 } |
| 19 | 19 |
| 20 DesktopFactoryOzone* DesktopFactoryOzone::GetInstance() { | 20 DesktopFactoryOzone* DesktopFactoryOzone::GetInstance() { |
| 21 CHECK(impl_) << "DesktopFactoryOzone accessed before constructed"; | 21 // DesktopFactoryOzone accessed before constructed |
| 22 CHECK(impl_); |
| 22 return impl_; | 23 return impl_; |
| 23 } | 24 } |
| 24 | 25 |
| 25 void DesktopFactoryOzone::SetInstance(DesktopFactoryOzone* impl) { | 26 void DesktopFactoryOzone::SetInstance(DesktopFactoryOzone* impl) { |
| 26 impl_ = impl; | 27 impl_ = impl; |
| 27 } | 28 } |
| 28 | 29 |
| 29 } // namespace views | 30 } // namespace views |
| OLD | NEW |