| 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_RENDER_PROCESS_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/id_map.h" | 9 #include "base/id_map.h" |
| 10 #include "base/process/kill.h" | 10 #include "base/process/kill.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 // communication channel. There will generally be one RenderProcessHost per | 35 // communication channel. There will generally be one RenderProcessHost per |
| 36 // renderer process. | 36 // renderer process. |
| 37 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, | 37 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, |
| 38 public IPC::Listener, | 38 public IPC::Listener, |
| 39 public base::SupportsUserData { | 39 public base::SupportsUserData { |
| 40 public: | 40 public: |
| 41 typedef IDMap<RenderProcessHost>::iterator iterator; | 41 typedef IDMap<RenderProcessHost>::iterator iterator; |
| 42 | 42 |
| 43 // Details for RENDERER_PROCESS_CLOSED notifications. | 43 // Details for RENDERER_PROCESS_CLOSED notifications. |
| 44 struct RendererClosedDetails { | 44 struct RendererClosedDetails { |
| 45 RendererClosedDetails(base::ProcessHandle handle, | 45 RendererClosedDetails(base::TerminationStatus status, |
| 46 base::TerminationStatus status, | |
| 47 int exit_code) { | 46 int exit_code) { |
| 48 this->handle = handle; | |
| 49 this->status = status; | 47 this->status = status; |
| 50 this->exit_code = exit_code; | 48 this->exit_code = exit_code; |
| 51 } | 49 } |
| 52 base::ProcessHandle handle; | |
| 53 base::TerminationStatus status; | 50 base::TerminationStatus status; |
| 54 int exit_code; | 51 int exit_code; |
| 55 }; | 52 }; |
| 56 | 53 |
| 57 // General functions --------------------------------------------------------- | 54 // General functions --------------------------------------------------------- |
| 58 | 55 |
| 59 ~RenderProcessHost() override {} | 56 ~RenderProcessHost() override {} |
| 60 | 57 |
| 61 // Initialize the new renderer process, returning true on success. This must | 58 // Initialize the new renderer process, returning true on success. This must |
| 62 // be called once before the object can be used, but can be called after | 59 // be called once before the object can be used, but can be called after |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 static void SetMaxRendererProcessCount(size_t count); | 284 static void SetMaxRendererProcessCount(size_t count); |
| 288 | 285 |
| 289 // Returns the current maximum number of renderer process hosts kept by the | 286 // Returns the current maximum number of renderer process hosts kept by the |
| 290 // content module. | 287 // content module. |
| 291 static size_t GetMaxRendererProcessCount(); | 288 static size_t GetMaxRendererProcessCount(); |
| 292 }; | 289 }; |
| 293 | 290 |
| 294 } // namespace content. | 291 } // namespace content. |
| 295 | 292 |
| 296 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 293 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |