summaryrefslogtreecommitdiffstats
path: root/athena/system/system_ui_impl.cc
blob: 4b94d03a32c47e314b1d94131f802c5d4b6848e1 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright 2014 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 "athena/system/public/system_ui.h"

#include "athena/system/power_button_controller.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"

namespace athena {
namespace {

SystemUI* instance = NULL;

class SystemUIImpl : public SystemUI {
 public:
  SystemUIImpl() : power_button_controller_(new PowerButtonController) {
  }

  virtual ~SystemUIImpl() {
  }

 private:
  scoped_ptr<PowerButtonController> power_button_controller_;

  DISALLOW_COPY_AND_ASSIGN(SystemUIImpl);
};

}  // namespace

// static
SystemUI* SystemUI::Create() {
  instance = new SystemUIImpl;
  return instance;
}

// static
void SystemUI::Shutdown() {
  CHECK(instance);
  delete instance;
  instance = NULL;
}

}  // namespace athena