| 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.h" | 10 #include "base/process.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, | 35 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, |
| 36 public IPC::Listener { | 36 public IPC::Listener { |
| 37 public: | 37 public: |
| 38 typedef IDMap<RenderProcessHost>::iterator iterator; | 38 typedef IDMap<RenderProcessHost>::iterator iterator; |
| 39 typedef IDMap<RenderWidgetHost>::const_iterator RenderWidgetHostsIterator; | 39 typedef IDMap<RenderWidgetHost>::const_iterator RenderWidgetHostsIterator; |
| 40 | 40 |
| 41 // Details for RENDERER_PROCESS_CLOSED notifications. | 41 // Details for RENDERER_PROCESS_CLOSED notifications. |
| 42 struct RendererClosedDetails { | 42 struct RendererClosedDetails { |
| 43 RendererClosedDetails(base::ProcessHandle handle, | 43 RendererClosedDetails(base::ProcessHandle handle, |
| 44 base::TerminationStatus status, | 44 base::TerminationStatus status, |
| 45 int exit_code, | 45 int exit_code) { |
| 46 bool was_alive) { | |
| 47 this->handle = handle; | 46 this->handle = handle; |
| 48 this->status = status; | 47 this->status = status; |
| 49 this->exit_code = exit_code; | 48 this->exit_code = exit_code; |
| 50 this->was_alive = was_alive; | |
| 51 } | 49 } |
| 52 base::ProcessHandle handle; | 50 base::ProcessHandle handle; |
| 53 base::TerminationStatus status; | 51 base::TerminationStatus status; |
| 54 int exit_code; | 52 int exit_code; |
| 55 bool was_alive; | |
| 56 }; | 53 }; |
| 57 | 54 |
| 58 virtual ~RenderProcessHost() {} | 55 virtual ~RenderProcessHost() {} |
| 59 | 56 |
| 60 // Initialize the new renderer process, returning true on success. This must | 57 // Initialize the new renderer process, returning true on success. This must |
| 61 // be called once before the object can be used, but can be called after | 58 // be called once before the object can be used, but can be called after |
| 62 // that with no effect. Therefore, if the caller isn't sure about whether | 59 // that with no effect. Therefore, if the caller isn't sure about whether |
| 63 // the process has been created, it should just call Init(). | 60 // the process has been created, it should just call Init(). |
| 64 virtual bool Init() = 0; | 61 virtual bool Init() = 0; |
| 65 | 62 |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 static void SetMaxRendererProcessCount(size_t count); | 236 static void SetMaxRendererProcessCount(size_t count); |
| 240 | 237 |
| 241 // Returns the current max number of renderer processes used by the content | 238 // Returns the current max number of renderer processes used by the content |
| 242 // module. | 239 // module. |
| 243 static size_t GetMaxRendererProcessCount(); | 240 static size_t GetMaxRendererProcessCount(); |
| 244 }; | 241 }; |
| 245 | 242 |
| 246 } // namespace content. | 243 } // namespace content. |
| 247 | 244 |
| 248 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 245 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |