#include "ui/ozone/public/ozone_platform.h"
#include <memory>
#include <utility>
#include "base/check_op.h"
#include "base/no_destructor.h"
#include "base/task/single_thread_task_runner.h"
#include "base/trace_event/trace_event.h"
#include "ui/events/devices/device_data_manager.h"
#include "ui/ozone/platform_object.h"
#include "ui/ozone/platform_selection.h"
#include "ui/ozone/public/platform_global_shortcut_listener.h"
#include "ui/ozone/public/platform_keyboard_hook.h"
#include "ui/ozone/public/platform_menu_utils.h"
#include "ui/ozone/public/platform_screen.h"
#include "ui/ozone/public/platform_user_input_monitor.h"
namespace ui {
namespace {
OzonePlatform* g_instance = …;
bool g_fail_initialize_ui_for_test = …;
void EnsureInstance() { … }
}
OzonePlatform::PlatformRuntimeProperties::SupportsSsdForTest
OzonePlatform::PlatformRuntimeProperties::override_supports_ssd_for_test = …;
OzonePlatform::PlatformProperties::PlatformProperties() = default;
OzonePlatform::PlatformProperties::~PlatformProperties() = default;
OzonePlatform::PlatformRuntimeProperties::PlatformRuntimeProperties() = default;
OzonePlatform::OzonePlatform() { … }
OzonePlatform::~OzonePlatform() = default;
void OzonePlatform::PreEarlyInitialization() { … }
bool OzonePlatform::InitializeForUI(const InitParams& args) { … }
void OzonePlatform::InitializeForGPU(const InitParams& args) { … }
OzonePlatform* OzonePlatform::GetInstance() { … }
bool OzonePlatform::IsInitialized() { … }
std::string OzonePlatform::GetPlatformNameForTest() { … }
PlatformClipboard* OzonePlatform::GetPlatformClipboard() { … }
PlatformGLEGLUtility* OzonePlatform::GetPlatformGLEGLUtility() { … }
PlatformMenuUtils* OzonePlatform::GetPlatformMenuUtils() { … }
PlatformUtils* OzonePlatform::GetPlatformUtils() { … }
PlatformGlobalShortcutListener*
OzonePlatform::GetPlatformGlobalShortcutListener(
PlatformGlobalShortcutListenerDelegate* delegate) { … }
std::unique_ptr<PlatformKeyboardHook> OzonePlatform::CreateKeyboardHook(
PlatformKeyboardHookTypes type,
base::RepeatingCallback<void(KeyEvent* event)> callback,
std::optional<base::flat_set<DomCode>> dom_codes,
gfx::AcceleratedWidget accelerated_widget) { … }
bool OzonePlatform::IsNativePixmapConfigSupported(
gfx::BufferFormat format,
gfx::BufferUsage usage) const { … }
bool OzonePlatform::ShouldUseCustomFrame() { … }
const OzonePlatform::PlatformProperties&
OzonePlatform::GetPlatformProperties() { … }
const OzonePlatform::PlatformRuntimeProperties&
OzonePlatform::GetPlatformRuntimeProperties() { … }
void OzonePlatform::AddInterfaces(mojo::BinderMap* binders) { … }
void OzonePlatform::AfterSandboxEntry() { … }
std::unique_ptr<PlatformUserInputMonitor>
OzonePlatform::GetPlatformUserInputMonitor(
const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) { … }
void OzonePlatform::PostCreateMainMessageLoop(
base::OnceCallback<void()> shutdown_cb,
scoped_refptr<base::SingleThreadTaskRunner> input_event_task_runner) { … }
void OzonePlatform::PostMainMessageLoopRun() { … }
bool OzonePlatform::ShouldFailInitializeUIForTest() { … }
void OzonePlatform::SetFailInitializeUIForTest(bool fail) { … }
void OzonePlatform::PreEarlyInitialize() { … }
}