OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/shell/browser/desktop_controller.h" | 5 #include "extensions/shell/browser/desktop_controller.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 | 9 |
10 namespace extensions { | 10 namespace extensions { |
11 namespace { | 11 namespace { |
12 | 12 |
13 DesktopController* g_instance = NULL; | 13 DesktopController* g_instance = nullptr; |
14 | 14 |
15 } // namespace | 15 } // namespace |
16 | 16 |
17 // static | 17 // static |
18 DesktopController* DesktopController::instance() { | 18 DesktopController* DesktopController::instance() { |
19 return g_instance; | 19 return g_instance; |
20 } | 20 } |
21 | 21 |
22 DesktopController::DesktopController() { | 22 DesktopController::DesktopController() { |
23 CHECK(!g_instance) << "DesktopController already exists"; | 23 CHECK(!g_instance) << "DesktopController already exists"; |
24 g_instance = this; | 24 g_instance = this; |
25 } | 25 } |
26 | 26 |
27 DesktopController::~DesktopController() { | 27 DesktopController::~DesktopController() { |
28 DCHECK(g_instance); | 28 DCHECK(g_instance); |
29 g_instance = NULL; | 29 g_instance = nullptr; |
30 } | 30 } |
31 | 31 |
32 } // namespace extensions | 32 } // namespace extensions |
OLD | NEW |