summaryrefslogtreecommitdiffstats
path: root/content/gpu/gpu_process_control_impl.cc
blob: cb3175b8bfc0bbd0272744fa8e289428f946b451 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2015 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 "content/gpu/gpu_process_control_impl.h"

#if defined(ENABLE_MOJO_MEDIA_IN_GPU_PROCESS)
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "media/mojo/services/mojo_media_application.h"
#include "mojo/shell/static_application_loader.h"
#endif

namespace content {

GpuProcessControlImpl::GpuProcessControlImpl() {}

GpuProcessControlImpl::~GpuProcessControlImpl() {}

void GpuProcessControlImpl::RegisterApplicationLoaders(
    URLToLoaderMap* url_to_loader_map) {
#if defined(ENABLE_MOJO_MEDIA_IN_GPU_PROCESS)
  (*url_to_loader_map)[GURL("mojo:media")] =
      new mojo::shell::StaticApplicationLoader(
          base::Bind(&media::MojoMediaApplication::CreateApp),
          base::Bind(&base::DoNothing));
#endif
}

}  // namespace content