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

Side by Side Diff: mojo/shell/desktop/mojo_main.cc

Issue 281353005: Mojo: nuke EnvironmentData (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix gn Created 6 years, 6 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/shell/context.cc ('k') | mojo/shell/shell_test_base.h » ('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 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/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "mojo/public/cpp/environment/environment.h"
11 #include "mojo/shell/child_process.h" 10 #include "mojo/shell/child_process.h"
12 #include "mojo/shell/context.h" 11 #include "mojo/shell/context.h"
13 #include "mojo/shell/init.h" 12 #include "mojo/shell/init.h"
14 #include "mojo/shell/run.h" 13 #include "mojo/shell/run.h"
15 #include "mojo/shell/switches.h" 14 #include "mojo/shell/switches.h"
16 #include "ui/gl/gl_surface.h" 15 #include "ui/gl/gl_surface.h"
17 16
18 int main(int argc, char** argv) { 17 int main(int argc, char** argv) {
19 base::AtExitManager at_exit; 18 base::AtExitManager at_exit;
20 mojo::Environment env;
21 base::CommandLine::Init(argc, argv); 19 base::CommandLine::Init(argc, argv);
22 mojo::shell::InitializeLogging(); 20 mojo::shell::InitializeLogging();
23 21
24 // TODO(vtl): Unify parent and child process cases to the extent possible. 22 // TODO(vtl): Unify parent and child process cases to the extent possible.
25 if (scoped_ptr<mojo::shell::ChildProcess> child_process = 23 if (scoped_ptr<mojo::shell::ChildProcess> child_process =
26 mojo::shell::ChildProcess::Create( 24 mojo::shell::ChildProcess::Create(
27 *base::CommandLine::ForCurrentProcess())) { 25 *base::CommandLine::ForCurrentProcess())) {
28 child_process->Main(); 26 child_process->Main();
29 } else { 27 } else {
30 gfx::GLSurface::InitializeOneOff(); 28 gfx::GLSurface::InitializeOneOff();
(...skipping 18 matching lines...) Expand all
49 message_loop.PostTask(FROM_HERE, 47 message_loop.PostTask(FROM_HERE,
50 base::Bind(mojo::shell::Run, 48 base::Bind(mojo::shell::Run,
51 &shell_context, 49 &shell_context,
52 app_urls)); 50 app_urls));
53 51
54 message_loop.Run(); 52 message_loop.Run();
55 } 53 }
56 54
57 return 0; 55 return 0;
58 } 56 }
OLDNEW
« no previous file with comments | « mojo/shell/context.cc ('k') | mojo/shell/shell_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698