OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stdio.h> | 5 #include <stdio.h> |
6 #include <string.h> | 6 #include <string.h> |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <iostream> | 9 #include <iostream> |
10 | 10 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 82 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
83 base::CommandLine::StringVector args = command_line->GetArgs(); | 83 base::CommandLine::StringVector args = command_line->GetArgs(); |
84 for (size_t i = 0; i < args.size(); ++i) { | 84 for (size_t i = 0; i < args.size(); ++i) { |
85 GURL possible_app(args[i]); | 85 GURL possible_app(args[i]); |
86 if (possible_app.SchemeIs("mojo")) { | 86 if (possible_app.SchemeIs("mojo")) { |
87 app_url = possible_app; | 87 app_url = possible_app; |
88 break; | 88 break; |
89 } | 89 } |
90 } | 90 } |
91 | 91 |
92 context->Run(app_url); | 92 context->Run(app_url, service_provider.Pass()); |
93 } | 93 } |
94 | 94 |
95 } // namespace | 95 } // namespace |
96 | 96 |
97 int LauncherProcessMain(int argc, char** argv) { | 97 int LauncherProcessMain(int argc, char** argv) { |
98 const base::CommandLine& command_line = | 98 const base::CommandLine& command_line = |
99 *base::CommandLine::ForCurrentProcess(); | 99 *base::CommandLine::ForCurrentProcess(); |
100 if (command_line.HasSwitch(switches::kTraceStartup)) { | 100 if (command_line.HasSwitch(switches::kTraceStartup)) { |
101 g_tracing = true; | 101 g_tracing = true; |
102 base::trace_event::CategoryFilter category_filter( | 102 base::trace_event::CategoryFilter category_filter( |
(...skipping 23 matching lines...) Expand all Loading... |
126 // Must be called before |message_loop| is destroyed. | 126 // Must be called before |message_loop| is destroyed. |
127 shell_context.Shutdown(); | 127 shell_context.Shutdown(); |
128 } | 128 } |
129 | 129 |
130 if (g_tracing) | 130 if (g_tracing) |
131 StopTracingAndFlushToDisk(); | 131 StopTracingAndFlushToDisk(); |
132 return 0; | 132 return 0; |
133 } | 133 } |
134 | 134 |
135 } // namespace mandoline | 135 } // namespace mandoline |
OLD | NEW |