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 CHROME_BROWSER_UTILITY_PROCESS_HOST_H_ | 5 #ifndef CHROME_BROWSER_UTILITY_PROCESS_HOST_H_ |
6 #define CHROME_BROWSER_UTILITY_PROCESS_HOST_H_ | 6 #define CHROME_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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 virtual ~Client() {} | 109 virtual ~Client() {} |
110 | 110 |
111 private: | 111 private: |
112 friend class UtilityProcessHost; | 112 friend class UtilityProcessHost; |
113 | 113 |
114 bool OnMessageReceived(const IPC::Message& message); | 114 bool OnMessageReceived(const IPC::Message& message); |
115 | 115 |
116 DISALLOW_COPY_AND_ASSIGN(Client); | 116 DISALLOW_COPY_AND_ASSIGN(Client); |
117 }; | 117 }; |
118 | 118 |
119 UtilityProcessHost(ResourceDispatcherHost* rdh, Client* client, | 119 UtilityProcessHost(Client* client, BrowserThread::ID client_thread_id); |
120 BrowserThread::ID client_thread_id); | |
121 virtual ~UtilityProcessHost(); | 120 virtual ~UtilityProcessHost(); |
122 | 121 |
123 // Start a process to unpack the extension at the given path. The process | 122 // Start a process to unpack the extension at the given path. The process |
124 // will be given access to the directory subtree that the extension file is | 123 // will be given access to the directory subtree that the extension file is |
125 // in, so the caller is expected to have moved that file into a quarantined | 124 // in, so the caller is expected to have moved that file into a quarantined |
126 // location first. | 125 // location first. |
127 bool StartExtensionUnpacker(const FilePath& extension); | 126 bool StartExtensionUnpacker(const FilePath& extension); |
128 | 127 |
129 // Start a process to unpack and parse a web resource from the given JSON | 128 // Start a process to unpack and parse a web resource from the given JSON |
130 // data. Any links that need to be downloaded from the parsed data | 129 // data. Any links that need to be downloaded from the parsed data |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 scoped_refptr<Client> client_; | 185 scoped_refptr<Client> client_; |
187 BrowserThread::ID client_thread_id_; | 186 BrowserThread::ID client_thread_id_; |
188 // True when running in batch mode, i.e., StartBatchMode() has been called | 187 // True when running in batch mode, i.e., StartBatchMode() has been called |
189 // and the utility process will run until EndBatchMode(). | 188 // and the utility process will run until EndBatchMode(). |
190 bool is_batch_mode_; | 189 bool is_batch_mode_; |
191 | 190 |
192 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHost); | 191 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHost); |
193 }; | 192 }; |
194 | 193 |
195 #endif // CHROME_BROWSER_UTILITY_PROCESS_HOST_H_ | 194 #endif // CHROME_BROWSER_UTILITY_PROCESS_HOST_H_ |
OLD | NEW |