| 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" |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "ipc/ipc_sender.h" | 12 #include "ipc/ipc_sender.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 class FilePath; | 15 class FilePath; |
| 16 class SequencedTaskRunner; | 16 class SequencedTaskRunner; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace content { | 19 namespace content { |
| 20 class ServiceRegistry; |
| 20 class UtilityProcessHostClient; | 21 class UtilityProcessHostClient; |
| 21 struct ChildProcessData; | 22 struct ChildProcessData; |
| 22 | 23 |
| 23 // This class acts as the browser-side host to a utility child process. A | 24 // This class acts as the browser-side host to a utility child process. A |
| 24 // utility process is a short-lived process that is created to run a specific | 25 // utility process is a short-lived process that is created to run a specific |
| 25 // task. This class lives solely on the IO thread. | 26 // task. This class lives solely on the IO thread. |
| 26 // If you need a single method call in the process, use StartFooBar(p). | 27 // If you need a single method call in the process, use StartFooBar(p). |
| 27 // If you need multiple batches of work to be done in the process, use | 28 // If you need multiple batches of work to be done in the process, use |
| 28 // StartBatchMode(), then multiple calls to StartFooBar(p), then finish with | 29 // StartBatchMode(), then multiple calls to StartFooBar(p), then finish with |
| 29 // EndBatchMode(). | 30 // EndBatchMode(). |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // Make the process run elevated. | 66 // Make the process run elevated. |
| 66 virtual void ElevatePrivileges() = 0; | 67 virtual void ElevatePrivileges() = 0; |
| 67 #endif | 68 #endif |
| 68 | 69 |
| 69 // Returns information about the utility child process. | 70 // Returns information about the utility child process. |
| 70 virtual const ChildProcessData& GetData() = 0; | 71 virtual const ChildProcessData& GetData() = 0; |
| 71 | 72 |
| 72 #if defined(OS_POSIX) | 73 #if defined(OS_POSIX) |
| 73 virtual void SetEnv(const base::EnvironmentMap& env) = 0; | 74 virtual void SetEnv(const base::EnvironmentMap& env) = 0; |
| 74 #endif | 75 #endif |
| 76 |
| 77 // Starts the utility process in Mojo mode. |
| 78 virtual bool StartMojoMode() = 0; |
| 79 |
| 80 // Returns the ServiceRegistry for this process. |
| 81 virtual ServiceRegistry* GetServiceRegistry() = 0; |
| 75 }; | 82 }; |
| 76 | 83 |
| 77 }; // namespace content | 84 }; // namespace content |
| 78 | 85 |
| 79 #endif // CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_H_ | 86 #endif // CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_H_ |
| OLD | NEW |