summaryrefslogtreecommitdiff
path: root/chromium/services/ui/display/screen_manager.cc
blob: 9fb4746187f59299daaf6364b9fff5dc445802ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "services/ui/display/screen_manager.h"

#include "base/logging.h"

namespace display {

// static
ScreenManager* ScreenManager::instance_ = nullptr;

ScreenManager::ScreenManager() {
  DCHECK(!instance_);
  instance_ = this;
}

ScreenManager::~ScreenManager() {
  DCHECK_EQ(instance_, this);
  instance_ = nullptr;
}

// static
ScreenManager* ScreenManager::GetInstance() {
  DCHECK(instance_);
  return instance_;
}

}  // namespace display