| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/utility/utility_thread_impl.h" | 5 #include "content/utility/utility_thread_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 template<typename SRC, typename DEST> | 33 template<typename SRC, typename DEST> |
| 34 void ConvertVector(const SRC& src, DEST* dest) { | 34 void ConvertVector(const SRC& src, DEST* dest) { |
| 35 dest->reserve(src.size()); | 35 dest->reserve(src.size()); |
| 36 for (typename SRC::const_iterator i = src.begin(); i != src.end(); ++i) | 36 for (typename SRC::const_iterator i = src.begin(); i != src.end(); ++i) |
| 37 dest->push_back(typename DEST::value_type(*i)); | 37 dest->push_back(typename DEST::value_type(*i)); |
| 38 } | 38 } |
| 39 | 39 |
| 40 } // namespace | 40 } // namespace |
| 41 | 41 |
| 42 UtilityThreadImpl::UtilityThreadImpl() | 42 UtilityThreadImpl::UtilityThreadImpl() |
| 43 : ChildThreadImpl(ChildThreadImpl::Options::Builder(). | 43 : ChildThreadImpl(ChildThreadImpl::Options::Builder().Build()) { |
| 44 UseMojoShellConnection(true).Build()) { | |
| 45 Init(); | 44 Init(); |
| 46 } | 45 } |
| 47 | 46 |
| 48 UtilityThreadImpl::UtilityThreadImpl(const InProcessChildThreadParams& params) | 47 UtilityThreadImpl::UtilityThreadImpl(const InProcessChildThreadParams& params) |
| 49 : ChildThreadImpl(ChildThreadImpl::Options::Builder() | 48 : ChildThreadImpl(ChildThreadImpl::Options::Builder() |
| 50 .InBrowserProcess(params) | 49 .InBrowserProcess(params) |
| 51 .UseMojoChannel(true) | 50 .UseMojoChannel(true) |
| 52 .UseMojoShellConnection(true) | |
| 53 .Build()) { | 51 .Build()) { |
| 54 Init(); | 52 Init(); |
| 55 } | 53 } |
| 56 | 54 |
| 57 UtilityThreadImpl::~UtilityThreadImpl() { | 55 UtilityThreadImpl::~UtilityThreadImpl() { |
| 58 } | 56 } |
| 59 | 57 |
| 60 void UtilityThreadImpl::Shutdown() { | 58 void UtilityThreadImpl::Shutdown() { |
| 61 ChildThreadImpl::Shutdown(); | 59 ChildThreadImpl::Shutdown(); |
| 62 | 60 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 } | 126 } |
| 129 | 127 |
| 130 void UtilityThreadImpl::BindProcessControlRequest( | 128 void UtilityThreadImpl::BindProcessControlRequest( |
| 131 mojo::InterfaceRequest<mojom::ProcessControl> request) { | 129 mojo::InterfaceRequest<mojom::ProcessControl> request) { |
| 132 DCHECK(process_control_); | 130 DCHECK(process_control_); |
| 133 process_control_bindings_.AddBinding(process_control_.get(), | 131 process_control_bindings_.AddBinding(process_control_.get(), |
| 134 std::move(request)); | 132 std::move(request)); |
| 135 } | 133 } |
| 136 | 134 |
| 137 } // namespace content | 135 } // namespace content |
| OLD | NEW |