| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_RENDERER_HOST_RENDER_PROCESS_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/id_map.h" | 10 #include "base/id_map.h" |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 // browser_process.h) | 181 // browser_process.h) |
| 182 scoped_ptr<IPC::SyncChannel> channel_; | 182 scoped_ptr<IPC::SyncChannel> channel_; |
| 183 | 183 |
| 184 // the registered listeners. When this list is empty or all NULL, we should | 184 // the registered listeners. When this list is empty or all NULL, we should |
| 185 // delete ourselves | 185 // delete ourselves |
| 186 IDMap<IPC::Channel::Listener> listeners_; | 186 IDMap<IPC::Channel::Listener> listeners_; |
| 187 | 187 |
| 188 // The maximum page ID we've ever seen from the renderer process. | 188 // The maximum page ID we've ever seen from the renderer process. |
| 189 int32 max_page_id_; | 189 int32 max_page_id_; |
| 190 | 190 |
| 191 // Indicates whether we have notified that the process has terminated. We | |
| 192 // only want to send this out once. | |
| 193 bool notified_termination_; | |
| 194 | |
| 195 private: | 191 private: |
| 196 int pid_; | 192 int pid_; |
| 197 | 193 |
| 198 Profile* profile_; | 194 Profile* profile_; |
| 199 | 195 |
| 200 // set of listeners that expect the renderer process to close | 196 // set of listeners that expect the renderer process to close |
| 201 std::set<int> listeners_expecting_close_; | 197 std::set<int> listeners_expecting_close_; |
| 202 | 198 |
| 203 // See getter above. | 199 // See getter above. |
| 204 static bool run_renderer_in_process_; | 200 static bool run_renderer_in_process_; |
| 205 | 201 |
| 206 DISALLOW_COPY_AND_ASSIGN(RenderProcessHost); | 202 DISALLOW_COPY_AND_ASSIGN(RenderProcessHost); |
| 207 }; | 203 }; |
| 208 | 204 |
| 209 // Factory object for RenderProcessHosts. Using this factory allows tests to | 205 // Factory object for RenderProcessHosts. Using this factory allows tests to |
| 210 // swap out a different one to use a TestRenderProcessHost. | 206 // swap out a different one to use a TestRenderProcessHost. |
| 211 class RenderProcessHostFactory { | 207 class RenderProcessHostFactory { |
| 212 public: | 208 public: |
| 213 virtual ~RenderProcessHostFactory() {} | 209 virtual ~RenderProcessHostFactory() {} |
| 214 virtual RenderProcessHost* CreateRenderProcessHost( | 210 virtual RenderProcessHost* CreateRenderProcessHost( |
| 215 Profile* profile) const = 0; | 211 Profile* profile) const = 0; |
| 216 }; | 212 }; |
| 217 | 213 |
| 218 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ | 214 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |