OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "mojo/shell/context.h" | 9 #include "mojo/shell/context.h" |
10 #include "mojo/shell/init.h" | 10 #include "mojo/shell/init.h" |
11 #include "mojo/shell/run.h" | 11 #include "mojo/shell/run.h" |
12 #include "ui/gl/gl_surface.h" | 12 #include "ui/gl/gl_surface.h" |
13 | 13 |
14 int main(int argc, char** argv) { | 14 int main(int argc, char** argv) { |
15 base::AtExitManager at_exit; | 15 base::AtExitManager at_exit; |
16 CommandLine::Init(argc, argv); | 16 CommandLine::Init(argc, argv); |
17 | 17 |
18 mojo::shell::InitializeLogging(); | 18 mojo::shell::InitializeLogging(); |
19 | 19 |
20 gfx::GLSurface::InitializeOneOff(); | 20 gfx::GLSurface::InitializeOneOff(); |
21 | 21 |
22 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI); | 22 base::MessageLoop message_loop; |
23 | |
24 mojo::shell::Context context; | 23 mojo::shell::Context context; |
25 message_loop.PostTask(FROM_HERE, base::Bind(mojo::shell::Run, &context)); | 24 message_loop.PostTask(FROM_HERE, base::Bind(mojo::shell::Run, &context)); |
26 | 25 |
27 message_loop.Run(); | 26 message_loop.Run(); |
28 | 27 |
29 return 0; | 28 return 0; |
30 } | 29 } |
OLD | NEW |