Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "services/ui/display/platform_screen.h" | |
| 6 | |
| 7 #include "base/logging.h" | |
| 8 | |
| 9 namespace display { | |
| 10 | |
| 11 PlatformScreen* PlatformScreen::instance_ = nullptr; | |
|
sky
2016/09/08 18:03:35
Typically we comment with a
// static
on the previ
kylechar
2016/09/08 18:12:03
Done.
| |
| 12 | |
| 13 PlatformScreen::PlatformScreen() { | |
| 14 DCHECK(!instance_); | |
| 15 instance_ = this; | |
| 16 } | |
| 17 | |
| 18 PlatformScreen::~PlatformScreen() { | |
| 19 DCHECK_EQ(instance_, this); | |
| 20 instance_ = nullptr; | |
| 21 } | |
| 22 | |
| 23 // static | |
| 24 PlatformScreen* PlatformScreen::GetInstance() { | |
| 25 DCHECK(instance_); | |
| 26 return instance_; | |
| 27 } | |
| 28 | |
| 29 } // namespace display | |
| OLD | NEW |