| 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 #ifndef CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_ | 5 #ifndef CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_ |
| 6 #define CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_ | 6 #define CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 protected: | 109 protected: |
| 110 bool Send(IPC::Message* msg); | 110 bool Send(IPC::Message* msg); |
| 111 | 111 |
| 112 // Allows this method to be overridden for tests. | 112 // Allows this method to be overridden for tests. |
| 113 virtual base::FilePath GetUtilityProcessCmd(); | 113 virtual base::FilePath GetUtilityProcessCmd(); |
| 114 | 114 |
| 115 // ChildProcessHostDelegate implementation: | 115 // ChildProcessHostDelegate implementation: |
| 116 void OnChildDisconnected() override; | 116 void OnChildDisconnected() override; |
| 117 bool OnMessageReceived(const IPC::Message& message) override; | 117 bool OnMessageReceived(const IPC::Message& message) override; |
| 118 const base::Process& GetProcess() const override; | 118 const base::Process& GetProcess() const override; |
| 119 void BindInterface(const std::string& interface_name, |
| 120 mojo::ScopedMessagePipeHandle interface_pipe) override; |
| 119 | 121 |
| 120 private: | 122 private: |
| 121 // Starts a process. Returns true iff it succeeded. | 123 // Starts a process. Returns true iff it succeeded. |
| 122 bool StartProcess(bool no_sandbox); | 124 bool StartProcess(bool no_sandbox); |
| 123 | 125 |
| 124 // Launch the child process synchronously. | 126 // Launch the child process synchronously. |
| 125 bool Launch(base::CommandLine* cmd_line, bool no_sandbox); | 127 bool Launch(base::CommandLine* cmd_line, bool no_sandbox); |
| 126 | 128 |
| 127 base::ProcessHandle handle() const { return process_.Handle(); } | 129 base::ProcessHandle handle() const { return process_.Handle(); } |
| 128 | 130 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 152 | 154 |
| 153 class PdfToEmfState; | 155 class PdfToEmfState; |
| 154 std::unique_ptr<PdfToEmfState> pdf_to_emf_state_; | 156 std::unique_ptr<PdfToEmfState> pdf_to_emf_state_; |
| 155 | 157 |
| 156 base::WeakPtrFactory<ServiceUtilityProcessHost> weak_ptr_factory_; | 158 base::WeakPtrFactory<ServiceUtilityProcessHost> weak_ptr_factory_; |
| 157 | 159 |
| 158 DISALLOW_COPY_AND_ASSIGN(ServiceUtilityProcessHost); | 160 DISALLOW_COPY_AND_ASSIGN(ServiceUtilityProcessHost); |
| 159 }; | 161 }; |
| 160 | 162 |
| 161 #endif // CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_ | 163 #endif // CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_ |
| OLD | NEW |