• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2020 The Chromium Embedded Framework 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 "libcef/common/task_runner_manager.h"
6 
7 #include "base/logging.h"
8 
9 namespace {
10 
11 CefTaskRunnerManager* g_manager = nullptr;
12 
13 }  // namespace
14 
15 // static
Get()16 CefTaskRunnerManager* CefTaskRunnerManager::Get() {
17   return g_manager;
18 }
19 
CefTaskRunnerManager()20 CefTaskRunnerManager::CefTaskRunnerManager() {
21   // Only a single instance should exist.
22   DCHECK(!g_manager);
23   g_manager = this;
24 }
25 
~CefTaskRunnerManager()26 CefTaskRunnerManager::~CefTaskRunnerManager() {
27   g_manager = nullptr;
28 }
29