Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: mojo/public/cpp/application/lib/mojo_main_chromium.cc

Issue 372273004: Shutdown cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "mojo/public/cpp/application/application_delegate.h" 8 #include "mojo/public/cpp/application/application_delegate.h"
9 #include "mojo/public/cpp/application/application_impl.h" 9 #include "mojo/public/cpp/application/application_impl.h"
10 10
11 extern "C" APPLICATION_EXPORT MojoResult CDECL MojoMain( 11 extern "C" APPLICATION_EXPORT MojoResult CDECL MojoMain(
12 MojoHandle shell_handle) { 12 MojoHandle shell_handle) {
13 base::CommandLine::Init(0, NULL); 13 base::CommandLine::Init(0, NULL);
14 #if !defined(COMPONENT_BUILD)
14 base::AtExitManager at_exit; 15 base::AtExitManager at_exit;
16 #endif
15 base::MessageLoop loop; 17 base::MessageLoop loop;
16 scoped_ptr<mojo::ApplicationDelegate> delegate( 18 scoped_ptr<mojo::ApplicationDelegate> delegate(
17 mojo::ApplicationDelegate::Create()); 19 mojo::ApplicationDelegate::Create());
18 mojo::ApplicationImpl app(delegate.get()); 20 mojo::ApplicationImpl app(delegate.get());
19 app.BindShell(shell_handle); 21 app.BindShell(shell_handle);
20 loop.Run(); 22 loop.Run();
21 23
22 return MOJO_RESULT_OK; 24 return MOJO_RESULT_OK;
23 } 25 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698