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

Side by Side Diff: mojo/services/view_manager/main.cc

Issue 292743017: Cleanup: Use base::CommandLine in mojo/ (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 7 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
« no previous file with comments | « mojo/services/dbus_echo/dbus_echo_service.cc ('k') | mojo/shell/android/mojo_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/shell/application.h" 8 #include "mojo/public/cpp/shell/application.h"
9 #include "mojo/services/view_manager/root_node_manager.h" 9 #include "mojo/services/view_manager/root_node_manager.h"
10 #include "mojo/services/view_manager/view_manager_connection.h" 10 #include "mojo/services/view_manager/view_manager_connection.h"
11 11
12 #if defined(WIN32) 12 #if defined(WIN32)
13 #if !defined(CDECL) 13 #if !defined(CDECL)
14 #define CDECL __cdecl) 14 #define CDECL __cdecl)
15 #endif 15 #endif
16 #define VIEW_MANAGER_EXPORT __declspec(dllexport) 16 #define VIEW_MANAGER_EXPORT __declspec(dllexport)
17 #else 17 #else
18 #define CDECL 18 #define CDECL
19 #define VIEW_MANAGER_EXPORT __attribute__((visibility("default"))) 19 #define VIEW_MANAGER_EXPORT __attribute__((visibility("default")))
20 #endif 20 #endif
21 21
22 extern "C" VIEW_MANAGER_EXPORT MojoResult CDECL MojoMain( 22 extern "C" VIEW_MANAGER_EXPORT MojoResult CDECL MojoMain(
23 MojoHandle shell_handle) { 23 MojoHandle shell_handle) {
24 CommandLine::Init(0, NULL); 24 base::CommandLine::Init(0, NULL);
25 base::AtExitManager at_exit; 25 base::AtExitManager at_exit;
26 base::MessageLoop loop; 26 base::MessageLoop loop;
27 mojo::Application app(shell_handle); 27 mojo::Application app(shell_handle);
28 mojo::view_manager::service::RootNodeManager root_node_manager(app.shell()); 28 mojo::view_manager::service::RootNodeManager root_node_manager(app.shell());
29 app.AddService<mojo::view_manager::service::ViewManagerConnection>( 29 app.AddService<mojo::view_manager::service::ViewManagerConnection>(
30 &root_node_manager); 30 &root_node_manager);
31 loop.Run(); 31 loop.Run();
32 32
33 return MOJO_RESULT_OK; 33 return MOJO_RESULT_OK;
34 } 34 }
OLDNEW
« no previous file with comments | « mojo/services/dbus_echo/dbus_echo_service.cc ('k') | mojo/shell/android/mojo_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698