blob: 5f2d6a490b405d9fdf908c46912b2a72b0c2c361 [file] [log] [blame]
// 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 "base/at_exit.h"
#include "media/mojo/services/mojo_media_application.h"
#include "media/mojo/services/test_mojo_media_client.h"
#include "mojo/logging/init_logging.h"
#include "mojo/public/c/system/main.h"
#include "mojo/shell/public/cpp/application_runner.h"
MojoResult MojoMain(MojoHandle mojo_handle) {
// Enable logging.
base::AtExitManager at_exit;
mojo::ApplicationRunner::InitBaseCommandLine();
mojo::InitLogging();
mojo::ApplicationRunner runner(new media::MojoMediaApplication(
make_scoped_ptr(new media::TestMojoMediaClient())));
return runner.Run(mojo_handle, false /* init_base */);
}