Temporarily re-enabling SizeAfterPrefChange test with traces.
[chromium-blink-merge.git] / mojo / public / cpp / application / lib / mojo_main_chromium.cc
blob7f9f133000f375ac7fe55ad28183dba099ec72e4
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/at_exit.h"
6 #include "base/command_line.h"
7 #include "base/message_loop/message_loop.h"
8 #include "mojo/public/cpp/application/application.h"
9 #include "mojo/public/cpp/environment/environment.h"
10 #include "mojo/public/cpp/utility/run_loop.h"
12 extern "C" APPLICATION_EXPORT MojoResult CDECL MojoMain(
13 MojoHandle service_provider_handle) {
14 base::CommandLine::Init(0, NULL);
15 base::AtExitManager at_exit;
16 base::MessageLoop loop;
18 scoped_ptr<mojo::Application>app(mojo::Application::Create());
19 app->BindServiceProvider(
20 mojo::MakeScopedHandle(mojo::MessagePipeHandle(service_provider_handle)));
21 app->Initialize();
22 loop.Run();
24 return MOJO_RESULT_OK;