| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/nacl/common/nacl_service.h" | 5 #include "components/nacl/common/nacl_service.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/ptr_util.h" |
| 10 #include "content/public/common/mojo_channel_switches.h" | 11 #include "content/public/common/mojo_channel_switches.h" |
| 11 #include "content/public/common/service_names.mojom.h" | 12 #include "content/public/common/service_names.mojom.h" |
| 12 #include "ipc/ipc.mojom.h" | 13 #include "ipc/ipc.mojom.h" |
| 13 #include "mojo/edk/embedder/embedder.h" | 14 #include "mojo/edk/embedder/embedder.h" |
| 14 #include "mojo/edk/embedder/scoped_ipc_support.h" | 15 #include "mojo/edk/embedder/scoped_ipc_support.h" |
| 15 #include "mojo/edk/embedder/scoped_platform_handle.h" | 16 #include "mojo/edk/embedder/scoped_platform_handle.h" |
| 16 #include "services/service_manager/public/cpp/interface_registry.h" | 17 #include "services/service_manager/public/cpp/interface_registry.h" |
| 17 #include "services/service_manager/public/cpp/service.h" | 18 #include "services/service_manager/public/cpp/service.h" |
| 18 #include "services/service_manager/public/cpp/service_context.h" | 19 #include "services/service_manager/public/cpp/service_context.h" |
| 19 #include "services/service_manager/public/cpp/service_info.h" | 20 #include "services/service_manager/public/cpp/service_info.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 base::MakeUnique<mojo::edk::ScopedIPCSupport>(std::move(io_task_runner)); | 105 base::MakeUnique<mojo::edk::ScopedIPCSupport>(std::move(io_task_runner)); |
| 105 EstablishMojoConnection(); | 106 EstablishMojoConnection(); |
| 106 | 107 |
| 107 IPC::mojom::ChannelBootstrapPtr bootstrap; | 108 IPC::mojom::ChannelBootstrapPtr bootstrap; |
| 108 *ipc_channel = mojo::MakeRequest(&bootstrap).PassMessagePipe(); | 109 *ipc_channel = mojo::MakeRequest(&bootstrap).PassMessagePipe(); |
| 109 return base::MakeUnique<service_manager::ServiceContext>( | 110 return base::MakeUnique<service_manager::ServiceContext>( |
| 110 base::MakeUnique<NaClService>(bootstrap.PassInterface(), | 111 base::MakeUnique<NaClService>(bootstrap.PassInterface(), |
| 111 std::move(ipc_support)), | 112 std::move(ipc_support)), |
| 112 ConnectToServiceManager()); | 113 ConnectToServiceManager()); |
| 113 } | 114 } |
| OLD | NEW |