| 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 "mojo/runner/context.h" | 5 #include "mojo/runner/context.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
| 16 #include "base/process/process_info.h" | 16 #include "base/process/process_info.h" |
| 17 #include "base/run_loop.h" | 17 #include "base/run_loop.h" |
| 18 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
| 19 #include "base/strings/string_split.h" | 19 #include "base/strings/string_split.h" |
| 20 #include "base/strings/string_util.h" | 20 #include "base/strings/string_util.h" |
| 21 #include "base/trace_event/trace_event.h" | 21 #include "base/trace_event/trace_event.h" |
| 22 #include "build/build_config.h" | 22 #include "build/build_config.h" |
| 23 #include "components/devtools_service/public/cpp/switches.h" | 23 #include "components/devtools_service/public/cpp/switches.h" |
| 24 #include "components/devtools_service/public/interfaces/devtools_service.mojom.h
" | 24 #include "components/devtools_service/public/interfaces/devtools_service.mojom.h
" |
| 25 #include "mojo/application/public/cpp/application_connection.h" | 25 #include "mojo/application/public/cpp/application_connection.h" |
| 26 #include "mojo/application/public/cpp/application_delegate.h" | 26 #include "mojo/application/public/cpp/application_delegate.h" |
| 27 #include "mojo/application/public/cpp/application_impl.h" | 27 #include "mojo/application/public/cpp/application_impl.h" |
| 28 #include "mojo/common/trace_controller_impl.h" | 28 #include "mojo/common/trace_controller_impl.h" |
| 29 #include "mojo/common/tracing_impl.h" | 29 #include "mojo/common/tracing_impl.h" |
| 30 #include "mojo/edk/embedder/embedder.h" | |
| 31 #include "mojo/edk/embedder/simple_platform_support.h" | |
| 32 #include "mojo/package_manager/package_manager_impl.h" | 30 #include "mojo/package_manager/package_manager_impl.h" |
| 33 #include "mojo/runner/in_process_native_runner.h" | 31 #include "mojo/runner/in_process_native_runner.h" |
| 34 #include "mojo/runner/out_of_process_native_runner.h" | 32 #include "mojo/runner/out_of_process_native_runner.h" |
| 35 #include "mojo/runner/switches.h" | 33 #include "mojo/runner/switches.h" |
| 36 #include "mojo/services/tracing/public/cpp/switches.h" | 34 #include "mojo/services/tracing/public/cpp/switches.h" |
| 37 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h" | 35 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h" |
| 38 #include "mojo/shell/application_loader.h" | 36 #include "mojo/shell/application_loader.h" |
| 39 #include "mojo/shell/connect_to_application_params.h" | 37 #include "mojo/shell/connect_to_application_params.h" |
| 40 #include "mojo/shell/query_util.h" | 38 #include "mojo/shell/query_util.h" |
| 41 #include "mojo/shell/switches.h" | 39 #include "mojo/shell/switches.h" |
| 42 #include "mojo/util/filename_util.h" | 40 #include "mojo/util/filename_util.h" |
| 43 #include "url/gurl.h" | 41 #include "url/gurl.h" |
| 44 | 42 |
| 43 #if defined(USE_CHROME_EDK) |
| 44 #include "mojo/edk/embedder/embedder.h" |
| 45 #include "mojo/edk/embedder/simple_platform_support.h" |
| 46 #else |
| 47 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h" |
| 48 #include "third_party/mojo/src/mojo/edk/embedder/simple_platform_support.h" |
| 49 #endif |
| 50 |
| 45 namespace mojo { | 51 namespace mojo { |
| 46 namespace runner { | 52 namespace runner { |
| 47 namespace { | 53 namespace { |
| 48 | 54 |
| 49 // Used to ensure we only init once. | 55 // Used to ensure we only init once. |
| 50 class Setup { | 56 class Setup { |
| 51 public: | 57 public: |
| 52 Setup() { | 58 Setup() { |
| 53 embedder::Init(make_scoped_ptr(new embedder::SimplePlatformSupport())); | 59 embedder::Init(make_scoped_ptr(new embedder::SimplePlatformSupport())); |
| 54 } | 60 } |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 base::MessageLoop::current()->Quit(); | 301 base::MessageLoop::current()->Quit(); |
| 296 } else { | 302 } else { |
| 297 app_complete_callback_.Run(); | 303 app_complete_callback_.Run(); |
| 298 } | 304 } |
| 299 } | 305 } |
| 300 } | 306 } |
| 301 } | 307 } |
| 302 | 308 |
| 303 } // namespace runner | 309 } // namespace runner |
| 304 } // namespace mojo | 310 } // namespace mojo |
| OLD | NEW |