OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_UTILITY_PROCESS_HOST_H_ | 5 #ifndef CONTENT_BROWSER_UTILITY_PROCESS_HOST_H_ |
6 #define CONTENT_BROWSER_UTILITY_PROCESS_HOST_H_ | 6 #define CONTENT_BROWSER_UTILITY_PROCESS_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/process_util.h" | 14 #include "base/process_util.h" |
15 #include "content/browser/browser_child_process_host.h" | 15 #include "content/browser/browser_child_process_host.h" |
16 #include "content/browser/browser_thread.h" | |
17 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
| 17 #include "content/public/browser/browser_thread.h" |
18 | 18 |
19 // This class acts as the browser-side host to a utility child process. A | 19 // This class acts as the browser-side host to a utility child process. A |
20 // utility process is a short-lived sandboxed process that is created to run | 20 // utility process is a short-lived sandboxed process that is created to run |
21 // a specific task. This class lives solely on the IO thread. | 21 // a specific task. This class lives solely on the IO thread. |
22 // If you need a single method call in the sandbox, use StartFooBar(p). | 22 // If you need a single method call in the sandbox, use StartFooBar(p). |
23 // If you need multiple batches of work to be done in the sandboxed process, | 23 // If you need multiple batches of work to be done in the sandboxed process, |
24 // use StartBatchMode(), then multiple calls to StartFooBar(p), | 24 // use StartBatchMode(), then multiple calls to StartFooBar(p), |
25 // then finish with EndBatchMode(). | 25 // then finish with EndBatchMode(). |
26 class CONTENT_EXPORT UtilityProcessHost : public BrowserChildProcessHost { | 26 class CONTENT_EXPORT UtilityProcessHost : public BrowserChildProcessHost { |
27 public: | 27 public: |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 int child_flags_; | 103 int child_flags_; |
104 | 104 |
105 base::environment_vector env_; | 105 base::environment_vector env_; |
106 | 106 |
107 bool started_; | 107 bool started_; |
108 | 108 |
109 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHost); | 109 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHost); |
110 }; | 110 }; |
111 | 111 |
112 #endif // CONTENT_BROWSER_UTILITY_PROCESS_HOST_H_ | 112 #endif // CONTENT_BROWSER_UTILITY_PROCESS_HOST_H_ |
OLD | NEW |