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> |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 private: | 77 private: |
78 // Starts a process if necessary. Returns true if it succeeded or a process | 78 // Starts a process if necessary. Returns true if it succeeded or a process |
79 // has already been started via StartBatchMode(). | 79 // has already been started via StartBatchMode(). |
80 bool StartProcess(); | 80 bool StartProcess(); |
81 | 81 |
82 // IPC messages: | 82 // IPC messages: |
83 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 83 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
84 | 84 |
85 // BrowserChildProcessHost: | 85 // BrowserChildProcessHost: |
86 virtual void OnProcessCrashed(int exit_code) OVERRIDE; | 86 virtual void OnProcessCrashed(int exit_code) OVERRIDE; |
87 virtual bool CanShutdown() OVERRIDE; | |
88 | 87 |
89 // A pointer to our client interface, who will be informed of progress. | 88 // A pointer to our client interface, who will be informed of progress. |
90 scoped_refptr<Client> client_; | 89 scoped_refptr<Client> client_; |
91 content::BrowserThread::ID client_thread_id_; | 90 content::BrowserThread::ID client_thread_id_; |
92 // True when running in batch mode, i.e., StartBatchMode() has been called | 91 // True when running in batch mode, i.e., StartBatchMode() has been called |
93 // and the utility process will run until EndBatchMode(). | 92 // and the utility process will run until EndBatchMode(). |
94 bool is_batch_mode_; | 93 bool is_batch_mode_; |
95 | 94 |
96 // Allows a directory to be opened through the sandbox, in case it's needed by | 95 // Allows a directory to be opened through the sandbox, in case it's needed by |
97 // the operation. | 96 // the operation. |
98 FilePath exposed_dir_; | 97 FilePath exposed_dir_; |
99 | 98 |
100 // Whether to pass switches::kNoSandbox to the child. | 99 // Whether to pass switches::kNoSandbox to the child. |
101 bool no_sandbox_; | 100 bool no_sandbox_; |
102 | 101 |
103 // Flags defined in ChildProcessHost with which to start the process. | 102 // Flags defined in ChildProcessHost with which to start the process. |
104 int child_flags_; | 103 int child_flags_; |
105 | 104 |
106 base::environment_vector env_; | 105 base::environment_vector env_; |
107 | 106 |
108 bool started_; | 107 bool started_; |
109 | 108 |
110 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHost); | 109 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHost); |
111 }; | 110 }; |
112 | 111 |
113 #endif // CONTENT_BROWSER_UTILITY_PROCESS_HOST_H_ | 112 #endif // CONTENT_BROWSER_UTILITY_PROCESS_HOST_H_ |
OLD | NEW |