HumanRender/human_render/CEF/HumanAppContext.cpp
2024-12-20 01:46:41 +08:00

26 lines
573 B
C++

// Copyright (c) 2015 The Chromium Embedded Framework 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 "CEF/HumanAppContext.h"
#include "include/base/cef_logging.h"
HumanAppContext* g_main_context = nullptr;
// static
HumanAppContext* HumanAppContext::Get() {
DCHECK(g_main_context);
return g_main_context;
}
HumanAppContext::HumanAppContext() {
DCHECK(!g_main_context);
g_main_context = this;
}
HumanAppContext::~HumanAppContext() {
g_main_context = nullptr;
}