Files
rk35xx-android14/external/libchrome/mojo/core/embedder/embedder.cc
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

51 lines
1.3 KiB
C++

// 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 "mojo/core/embedder/embedder.h"
#include <stdint.h>
#include <utility>
#include "base/bind.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/task_runner.h"
#include "build/build_config.h"
#include "mojo/core/configuration.h"
#include "mojo/core/core.h"
#include "mojo/core/entrypoints.h"
#include "mojo/core/node_controller.h"
#include "mojo/public/c/system/thunks.h"
namespace mojo {
namespace core {
void Init(const Configuration& configuration) {
internal::g_configuration = configuration;
InitializeCore();
MojoEmbedderSetSystemThunks(&GetSystemThunks());
}
void Init() {
Init(Configuration());
}
void SetDefaultProcessErrorCallback(const ProcessErrorCallback& callback) {
Core::Get()->SetDefaultProcessErrorCallback(callback);
}
scoped_refptr<base::TaskRunner> GetIOTaskRunner() {
return Core::Get()->GetNodeController()->io_task_runner();
}
#if defined(OS_MACOSX) && !defined(OS_IOS)
void SetMachPortProvider(base::PortProvider* port_provider) {
DCHECK(port_provider);
Core::Get()->SetMachPortProvider(port_provider);
}
#endif
} // namespace core
} // namespace mojo