| Index: services/ui/gpu/gpu_main.cc
|
| diff --git a/services/ui/gpu/gpu_main.cc b/services/ui/gpu/gpu_main.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9764dd3763852a2e721d5fe33c79186f24946de2
|
| --- /dev/null
|
| +++ b/services/ui/gpu/gpu_main.cc
|
| @@ -0,0 +1,66 @@
|
| +// Copyright 2016 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 "services/ui/gpu/gpu_main.h"
|
| +
|
| +#include "base/command_line.h"
|
| +#include "services/ui/gpu/gpu_service_internal.h"
|
| +
|
| +namespace ui {
|
| +
|
| +GpuMain::GpuMain() : gpu_init_(this, *base::CommandLine::ForCurrentProcess()) {
|
| + DCHECK(gpu_service_internal_);
|
| +}
|
| +
|
| +GpuMain::~GpuMain() {}
|
| +
|
| +void GpuMain::Add(mojom::GpuServiceInternalRequest request) {
|
| + gpu_service_internal_->Add(std::move(request));
|
| +}
|
| +
|
| +void GpuMain::OnGpuInfoUpdate(const gpu::GPUInfo& gpu_info) {
|
| + gpu_info_ = gpu_info;
|
| +}
|
| +
|
| +void GpuMain::OnGpuWatchdogThreadCreated(gpu::GpuWatchdogThread* thread) {
|
| + watchdog_thread_ = thread;
|
| +}
|
| +
|
| +void GpuMain::OnGpuWatchdogThreadDestroyed() {
|
| + watchdog_thread_ = nullptr;
|
| +}
|
| +
|
| +bool GpuMain::ShouldInitializeGL() {
|
| + // TODO(sad): GL is currently initialized by WS. Once the gpu moves into a
|
| + // separate process, this should return true.
|
| + return false;
|
| +}
|
| +
|
| +void GpuMain::WaitForDebugger() {
|
| + NOTIMPLEMENTED();
|
| +}
|
| +
|
| +void GpuMain::PreSandboxInitialization() {}
|
| +
|
| +bool GpuMain::ShouldStartSandboxEarly() {
|
| + return false;
|
| +}
|
| +
|
| +void GpuMain::WarmUpSandbox() {}
|
| +
|
| +bool GpuMain::StartSandbox() {
|
| + return true;
|
| +}
|
| +
|
| +void GpuMain::InitializeMessageLoop() {}
|
| +
|
| +void GpuMain::Initialize(base::Time start_time,
|
| + bool dead_on_arrival,
|
| + std::vector<gpu::GpuInitLogMessage> int_log_messages,
|
| + gpu::GpuMemoryBufferFactory* gpu_buffer_factory) {
|
| + gpu_service_internal_.reset(
|
| + new GpuServiceInternal(watchdog_thread_, gpu_buffer_factory));
|
| +}
|
| +
|
| +} // namespace ui
|
|
|