| 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" |
| 41 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h" |
| 43 #include "url/gurl.h" | 42 #include "url/gurl.h" |
| 44 | 43 |
| 45 namespace mojo { | 44 namespace mojo { |
| 46 namespace runner { | 45 namespace runner { |
| 47 namespace { | 46 namespace { |
| 48 | 47 |
| 49 // Used to ensure we only init once. | 48 // Used to ensure we only init once. |
| 50 class Setup { | 49 class Setup { |
| 51 public: | 50 public: |
| 52 Setup() { | 51 Setup() { |
| 53 embedder::Init(make_scoped_ptr(new embedder::SimplePlatformSupport())); | 52 embedder::Init(); |
| 54 } | 53 } |
| 55 | 54 |
| 56 ~Setup() {} | 55 ~Setup() {} |
| 57 | 56 |
| 58 private: | 57 private: |
| 59 DISALLOW_COPY_AND_ASSIGN(Setup); | 58 DISALLOW_COPY_AND_ASSIGN(Setup); |
| 60 }; | 59 }; |
| 61 | 60 |
| 62 void InitContentHandlers(package_manager::PackageManagerImpl* manager, | 61 void InitContentHandlers(package_manager::PackageManagerImpl* manager, |
| 63 const base::CommandLine& command_line) { | 62 const base::CommandLine& command_line) { |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 base::MessageLoop::current()->Quit(); | 305 base::MessageLoop::current()->Quit(); |
| 307 } else { | 306 } else { |
| 308 app_complete_callback_.Run(); | 307 app_complete_callback_.Run(); |
| 309 } | 308 } |
| 310 } | 309 } |
| 311 } | 310 } |
| 312 } | 311 } |
| 313 | 312 |
| 314 } // namespace runner | 313 } // namespace runner |
| 315 } // namespace mojo | 314 } // namespace mojo |
| OLD | NEW |