| 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 <algorithm> | 5 #include <algorithm> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/profiler.h" | 8 #include "base/debug/profiler.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| 11 #include "mojo/application/application_runner_chromium.h" | 11 #include "mojo/application/application_runner_chromium.h" |
| 12 #include "mojo/data_pipe_utils/data_pipe_utils.h" | 12 #include "mojo/data_pipe_utils/data_pipe_utils.h" |
| 13 #include "mojo/public/c/system/main.h" | 13 #include "mojo/public/c/system/main.h" |
| 14 #include "mojo/public/cpp/application/application_delegate.h" | 14 #include "mojo/public/cpp/application/application_delegate.h" |
| 15 #include "mojo/public/cpp/application/application_impl.h" | 15 #include "mojo/public/cpp/application/application_impl.h" |
| 16 #include "mojo/public/cpp/bindings/binding.h" | 16 #include "mojo/public/cpp/bindings/binding.h" |
| 17 #include "mojo/services/http_server/public/cpp/http_server_util.h" | 17 #include "mojo/services/http_server/cpp/http_server_util.h" |
| 18 #include "mojo/services/http_server/public/interfaces/http_server.mojom.h" | 18 #include "mojo/services/http_server/interfaces/http_server.mojom.h" |
| 19 #include "mojo/services/http_server/public/interfaces/http_server_factory.mojom.
h" | 19 #include "mojo/services/http_server/interfaces/http_server_factory.mojom.h" |
| 20 #include "mojo/services/network/public/interfaces/net_address.mojom.h" | 20 #include "mojo/services/network/public/interfaces/net_address.mojom.h" |
| 21 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h" | 21 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h" |
| 22 #include "mojo/services/window_manager/public/interfaces/window_manager.mojom.h" | 22 #include "mojo/services/window_manager/public/interfaces/window_manager.mojom.h" |
| 23 #include "services/debugger/trace_collector.h" | 23 #include "services/debugger/trace_collector.h" |
| 24 | 24 |
| 25 // Debugger is a Mojo application that exposes an http server and talks to other | 25 // Debugger is a Mojo application that exposes an http server and talks to other |
| 26 // mojo apps in response to url requests received by the server. Supported | 26 // mojo apps in response to url requests received by the server. Supported |
| 27 // actions include tracing and profiling, allowing to interactively inspect how | 27 // actions include tracing and profiling, allowing to interactively inspect how |
| 28 // the shell is performing. | 28 // the shell is performing. |
| 29 | 29 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 DISALLOW_COPY_AND_ASSIGN(Debugger); | 215 DISALLOW_COPY_AND_ASSIGN(Debugger); |
| 216 }; | 216 }; |
| 217 | 217 |
| 218 } // namespace debugger | 218 } // namespace debugger |
| 219 | 219 |
| 220 MojoResult MojoMain(MojoHandle application_request) { | 220 MojoResult MojoMain(MojoHandle application_request) { |
| 221 mojo::ApplicationRunnerChromium runner(new debugger::Debugger); | 221 mojo::ApplicationRunnerChromium runner(new debugger::Debugger); |
| 222 runner.set_message_loop_type(base::MessageLoop::TYPE_IO); | 222 runner.set_message_loop_type(base::MessageLoop::TYPE_IO); |
| 223 return runner.Run(application_request); | 223 return runner.Run(application_request); |
| 224 } | 224 } |
| OLD | NEW |