| 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 CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_H_ |
| 7 | 7 |
| 8 #include "base/environment.h" | 8 #include "base/environment.h" |
| 9 #include "base/process/launch.h" | 9 #include "base/process/launch.h" |
| 10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 public base::SupportsWeakPtr<UtilityProcessHost> { | 35 public base::SupportsWeakPtr<UtilityProcessHost> { |
| 36 public: | 36 public: |
| 37 // Used to create a utility process. |client| is optional. If supplied it will | 37 // Used to create a utility process. |client| is optional. If supplied it will |
| 38 // be notified of incoming messages from the utility process. | 38 // be notified of incoming messages from the utility process. |
| 39 // |client_task_runner| is required if |client| is supplied and is the task | 39 // |client_task_runner| is required if |client| is supplied and is the task |
| 40 // runner upon which |client| will be invoked. | 40 // runner upon which |client| will be invoked. |
| 41 CONTENT_EXPORT static UtilityProcessHost* Create( | 41 CONTENT_EXPORT static UtilityProcessHost* Create( |
| 42 const scoped_refptr<UtilityProcessHostClient>& client, | 42 const scoped_refptr<UtilityProcessHostClient>& client, |
| 43 const scoped_refptr<base::SequencedTaskRunner>& client_task_runner); | 43 const scoped_refptr<base::SequencedTaskRunner>& client_task_runner); |
| 44 | 44 |
| 45 virtual ~UtilityProcessHost() {} | 45 ~UtilityProcessHost() override {} |
| 46 | 46 |
| 47 // Starts utility process in batch mode. Caller must call EndBatchMode() | 47 // Starts utility process in batch mode. Caller must call EndBatchMode() |
| 48 // to finish the utility process. | 48 // to finish the utility process. |
| 49 virtual bool StartBatchMode() = 0; | 49 virtual bool StartBatchMode() = 0; |
| 50 | 50 |
| 51 // Ends the utility process. Must be called after StartBatchMode(). | 51 // Ends the utility process. Must be called after StartBatchMode(). |
| 52 virtual void EndBatchMode() = 0; | 52 virtual void EndBatchMode() = 0; |
| 53 | 53 |
| 54 // Allows a directory to be opened through the sandbox, in case it's needed by | 54 // Allows a directory to be opened through the sandbox, in case it's needed by |
| 55 // the operation. | 55 // the operation. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 70 virtual const ChildProcessData& GetData() = 0; | 70 virtual const ChildProcessData& GetData() = 0; |
| 71 | 71 |
| 72 #if defined(OS_POSIX) | 72 #if defined(OS_POSIX) |
| 73 virtual void SetEnv(const base::EnvironmentMap& env) = 0; | 73 virtual void SetEnv(const base::EnvironmentMap& env) = 0; |
| 74 #endif | 74 #endif |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 }; // namespace content | 77 }; // namespace content |
| 78 | 78 |
| 79 #endif // CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_H_ | 79 #endif // CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_H_ |
| OLD | NEW |