Chromium Code Reviews| 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 <string> | |
|
Charlie Reis
2014/11/10 19:57:25
Is this necessary?
sramajay
2014/11/11 14:16:05
Done.
| |
| 9 | |
| 8 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 9 #include "base/id_map.h" | 11 #include "base/id_map.h" |
| 10 #include "base/process/kill.h" | 12 #include "base/process/kill.h" |
| 11 #include "base/process/process_handle.h" | 13 #include "base/process/process_handle.h" |
| 12 #include "base/supports_user_data.h" | 14 #include "base/supports_user_data.h" |
| 13 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 14 #include "ipc/ipc_channel_proxy.h" | 16 #include "ipc/ipc_channel_proxy.h" |
| 15 #include "ipc/ipc_sender.h" | 17 #include "ipc/ipc_sender.h" |
| 16 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
| 17 | 19 |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 35 // communication channel. There will generally be one RenderProcessHost per | 37 // communication channel. There will generally be one RenderProcessHost per |
| 36 // renderer process. | 38 // renderer process. |
| 37 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, | 39 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, |
| 38 public IPC::Listener, | 40 public IPC::Listener, |
| 39 public base::SupportsUserData { | 41 public base::SupportsUserData { |
| 40 public: | 42 public: |
| 41 typedef IDMap<RenderProcessHost>::iterator iterator; | 43 typedef IDMap<RenderProcessHost>::iterator iterator; |
| 42 | 44 |
| 43 // Details for RENDERER_PROCESS_CLOSED notifications. | 45 // Details for RENDERER_PROCESS_CLOSED notifications. |
| 44 struct RendererClosedDetails { | 46 struct RendererClosedDetails { |
| 45 RendererClosedDetails(base::ProcessHandle handle, | 47 RendererClosedDetails(base::TerminationStatus status, |
| 46 base::TerminationStatus status, | |
| 47 int exit_code) { | 48 int exit_code) { |
| 48 this->handle = handle; | |
| 49 this->status = status; | 49 this->status = status; |
| 50 this->exit_code = exit_code; | 50 this->exit_code = exit_code; |
| 51 } | 51 } |
| 52 base::ProcessHandle handle; | |
| 53 base::TerminationStatus status; | 52 base::TerminationStatus status; |
| 54 int exit_code; | 53 int exit_code; |
| 55 }; | 54 }; |
| 56 | 55 |
| 57 // General functions --------------------------------------------------------- | 56 // General functions --------------------------------------------------------- |
| 58 | 57 |
| 59 ~RenderProcessHost() override {} | 58 ~RenderProcessHost() override {} |
| 60 | 59 |
| 61 // Initialize the new renderer process, returning true on success. This must | 60 // 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 | 61 // 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); | 286 static void SetMaxRendererProcessCount(size_t count); |
| 288 | 287 |
| 289 // Returns the current maximum number of renderer process hosts kept by the | 288 // Returns the current maximum number of renderer process hosts kept by the |
| 290 // content module. | 289 // content module. |
| 291 static size_t GetMaxRendererProcessCount(); | 290 static size_t GetMaxRendererProcessCount(); |
| 292 }; | 291 }; |
| 293 | 292 |
| 294 } // namespace content. | 293 } // namespace content. |
| 295 | 294 |
| 296 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 295 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |