1 // Copyright 2019 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 "ash/public/cpp/kiosk_app_menu.h"
6 
7 namespace ash {
8 
9 namespace {
10 KioskAppMenu* g_instance = nullptr;
11 }
12 
13 KioskAppMenuEntry::KioskAppMenuEntry() = default;
14 KioskAppMenuEntry::KioskAppMenuEntry(const KioskAppMenuEntry& other) = default;
15 KioskAppMenuEntry::KioskAppMenuEntry(KioskAppMenuEntry&& other) = default;
16 KioskAppMenuEntry::~KioskAppMenuEntry() = default;
17 
18 KioskAppMenuEntry& KioskAppMenuEntry::operator=(KioskAppMenuEntry&& other) =
19     default;
20 KioskAppMenuEntry& KioskAppMenuEntry::operator=(
21     const KioskAppMenuEntry& other) = default;
22 
23 // static
Get()24 KioskAppMenu* KioskAppMenu::Get() {
25   return g_instance;
26 }
27 
KioskAppMenu()28 KioskAppMenu::KioskAppMenu() {
29   DCHECK_EQ(nullptr, g_instance);
30   g_instance = this;
31 }
32 
~KioskAppMenu()33 KioskAppMenu::~KioskAppMenu() {
34   DCHECK_EQ(this, g_instance);
35   g_instance = nullptr;
36 }
37 
38 }  // namespace ash
39