OLD | NEW |
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/bind.h" | 6 #include "base/bind.h" |
7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 base::FilePath(command_line.GetSwitchValuePath(kShellPath)))) { | 39 base::FilePath(command_line.GetSwitchValuePath(kShellPath)))) { |
40 // TODO(vtl): I guess this should be SLAVE, not NONE? | 40 // TODO(vtl): I guess this should be SLAVE, not NONE? |
41 embedder::InitIPCSupport(embedder::ProcessType::NONE, loop_.task_runner(), | 41 embedder::InitIPCSupport(embedder::ProcessType::NONE, loop_.task_runner(), |
42 this, loop_.task_runner(), | 42 this, loop_.task_runner(), |
43 embedder::ScopedPlatformHandle()); | 43 embedder::ScopedPlatformHandle()); |
44 | 44 |
45 base::SplitStringAlongWhitespace(command_line.GetSwitchValueASCII(kAppArgs), | 45 base::SplitStringAlongWhitespace(command_line.GetSwitchValueASCII(kAppArgs), |
46 &app_args_); | 46 &app_args_); |
47 } | 47 } |
48 | 48 |
49 ~Launcher() { | 49 ~Launcher() override { |
50 // TODO(vtl): We need to destroy this before calling | 50 // TODO(vtl): We need to destroy this before calling |
51 // ShutdownIPCSupportOnIOThread(). This is all quite sketchy, and we really | 51 // ShutdownIPCSupportOnIOThread(). This is all quite sketchy, and we really |
52 // should convert all of this to running the application on the main thread, | 52 // should convert all of this to running the application on the main thread, |
53 // with a separate I/O thread (and managing the lifetime of everything more | 53 // with a separate I/O thread (and managing the lifetime of everything more |
54 // carefully). | 54 // carefully). |
55 connection_.reset(); | 55 connection_.reset(); |
56 DCHECK(!application_request_.is_pending()); | 56 DCHECK(!application_request_.is_pending()); |
57 | 57 |
58 embedder::ShutdownIPCSupportOnIOThread(); | 58 embedder::ShutdownIPCSupportOnIOThread(); |
59 } | 59 } |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 123 |
124 if (!launcher.Register()) { | 124 if (!launcher.Register()) { |
125 LOG(ERROR) << "Error registering " | 125 LOG(ERROR) << "Error registering " |
126 << command_line->GetSwitchValueASCII(mojo::shell::kAppURL); | 126 << command_line->GetSwitchValueASCII(mojo::shell::kAppURL); |
127 return 1; | 127 return 1; |
128 } | 128 } |
129 | 129 |
130 launcher.Run(); | 130 launcher.Run(); |
131 return 0; | 131 return 0; |
132 } | 132 } |
OLD | NEW |