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" |
11 #include "base/process/process_handle.h" | 11 #include "base/process/process_handle.h" |
| 12 #include "base/supports_user_data.h" |
12 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
13 #include "ipc/ipc_channel_proxy.h" | 14 #include "ipc/ipc_channel_proxy.h" |
14 #include "ipc/ipc_sender.h" | 15 #include "ipc/ipc_sender.h" |
15 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
16 #include "ui/surface/transport_dib.h" | 17 #include "ui/surface/transport_dib.h" |
17 | 18 |
18 class GURL; | 19 class GURL; |
19 struct ViewMsg_SwapOut_Params; | 20 struct ViewMsg_SwapOut_Params; |
20 | 21 |
21 namespace content { | 22 namespace content { |
22 class BrowserContext; | 23 class BrowserContext; |
23 class RenderWidgetHost; | 24 class RenderWidgetHost; |
24 class StoragePartition; | 25 class StoragePartition; |
25 } | 26 } |
26 | 27 |
27 namespace base { | 28 namespace base { |
28 class TimeDelta; | 29 class TimeDelta; |
29 } | 30 } |
30 | 31 |
31 namespace content { | 32 namespace content { |
32 | 33 |
33 typedef base::Thread* (*RendererMainThreadFactoryFunction)( | 34 typedef base::Thread* (*RendererMainThreadFactoryFunction)( |
34 const std::string& id); | 35 const std::string& id); |
35 | 36 |
36 // Interface that represents the browser side of the browser <-> renderer | 37 // Interface that represents the browser side of the browser <-> renderer |
37 // communication channel. There will generally be one RenderProcessHost per | 38 // communication channel. There will generally be one RenderProcessHost per |
38 // renderer process. | 39 // renderer process. |
39 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, | 40 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, |
40 public IPC::Listener { | 41 public IPC::Listener, |
| 42 public base::SupportsUserData { |
41 public: | 43 public: |
42 typedef IDMap<RenderProcessHost>::iterator iterator; | 44 typedef IDMap<RenderProcessHost>::iterator iterator; |
43 | 45 |
44 // Details for RENDERER_PROCESS_CLOSED notifications. | 46 // Details for RENDERER_PROCESS_CLOSED notifications. |
45 struct RendererClosedDetails { | 47 struct RendererClosedDetails { |
46 RendererClosedDetails(base::ProcessHandle handle, | 48 RendererClosedDetails(base::ProcessHandle handle, |
47 base::TerminationStatus status, | 49 base::TerminationStatus status, |
48 int exit_code) { | 50 int exit_code) { |
49 this->handle = handle; | 51 this->handle = handle; |
50 this->status = status; | 52 this->status = status; |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 // module. | 254 // module. |
253 static size_t GetMaxRendererProcessCount(); | 255 static size_t GetMaxRendererProcessCount(); |
254 | 256 |
255 static void RegisterRendererMainThreadFactory( | 257 static void RegisterRendererMainThreadFactory( |
256 RendererMainThreadFactoryFunction create); | 258 RendererMainThreadFactoryFunction create); |
257 }; | 259 }; |
258 | 260 |
259 } // namespace content. | 261 } // namespace content. |
260 | 262 |
261 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 263 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
OLD | NEW |