| 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 "base/supports_user_data.h" |
| 13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 #include "ipc/ipc_channel_proxy.h" | 14 #include "ipc/ipc_channel_proxy.h" |
| 15 #include "ipc/ipc_sender.h" | 15 #include "ipc/ipc_sender.h" |
| 16 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
| 17 | 17 |
| 18 class GURL; | 18 class GURL; |
| 19 struct ViewMsg_SwapOut_Params; | 19 struct ViewMsg_SwapOut_Params; |
| 20 | 20 |
| 21 namespace base { | 21 namespace base { |
| 22 class TimeDelta; | 22 class TimeDelta; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace content { | 25 namespace content { |
| 26 class BrowserContext; | 26 class BrowserContext; |
| 27 class BrowserMessageFilter; | 27 class BrowserMessageFilter; |
| 28 class RenderProcessHostObserver; | 28 class RenderProcessHostObserver; |
| 29 class RenderWidgetHost; | 29 class RenderWidgetHost; |
| 30 class ServiceRegistry; | |
| 31 class StoragePartition; | 30 class StoragePartition; |
| 32 struct GlobalRequestID; | 31 struct GlobalRequestID; |
| 33 | 32 |
| 34 // Interface that represents the browser side of the browser <-> renderer | 33 // Interface that represents the browser side of the browser <-> renderer |
| 35 // communication channel. There will generally be one RenderProcessHost per | 34 // communication channel. There will generally be one RenderProcessHost per |
| 36 // renderer process. | 35 // renderer process. |
| 37 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, | 36 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, |
| 38 public IPC::Listener, | 37 public IPC::Listener, |
| 39 public base::SupportsUserData { | 38 public base::SupportsUserData { |
| 40 public: | 39 public: |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 #endif | 225 #endif |
| 227 | 226 |
| 228 // Tells the ResourceDispatcherHost to resume a deferred navigation without | 227 // Tells the ResourceDispatcherHost to resume a deferred navigation without |
| 229 // transferring it to a new renderer process. | 228 // transferring it to a new renderer process. |
| 230 virtual void ResumeDeferredNavigation(const GlobalRequestID& request_id) = 0; | 229 virtual void ResumeDeferredNavigation(const GlobalRequestID& request_id) = 0; |
| 231 | 230 |
| 232 // Notifies the renderer that the timezone configuration of the system might | 231 // Notifies the renderer that the timezone configuration of the system might |
| 233 // have changed. | 232 // have changed. |
| 234 virtual void NotifyTimezoneChange() = 0; | 233 virtual void NotifyTimezoneChange() = 0; |
| 235 | 234 |
| 236 // Returns the ServiceRegistry for this process. | |
| 237 virtual ServiceRegistry* GetServiceRegistry() = 0; | |
| 238 | |
| 239 // Static management functions ----------------------------------------------- | 235 // Static management functions ----------------------------------------------- |
| 240 | 236 |
| 241 // Flag to run the renderer in process. This is primarily | 237 // Flag to run the renderer in process. This is primarily |
| 242 // for debugging purposes. When running "in process", the | 238 // for debugging purposes. When running "in process", the |
| 243 // browser maintains a single RenderProcessHost which communicates | 239 // browser maintains a single RenderProcessHost which communicates |
| 244 // to a RenderProcess which is instantiated in the same process | 240 // to a RenderProcess which is instantiated in the same process |
| 245 // with the Browser. All IPC between the Browser and the | 241 // with the Browser. All IPC between the Browser and the |
| 246 // Renderer is the same, it's just not crossing a process boundary. | 242 // Renderer is the same, it's just not crossing a process boundary. |
| 247 | 243 |
| 248 static bool run_renderer_in_process(); | 244 static bool run_renderer_in_process(); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 static void SetMaxRendererProcessCount(size_t count); | 283 static void SetMaxRendererProcessCount(size_t count); |
| 288 | 284 |
| 289 // Returns the current max number of renderer processes used by the content | 285 // Returns the current max number of renderer processes used by the content |
| 290 // module. | 286 // module. |
| 291 static size_t GetMaxRendererProcessCount(); | 287 static size_t GetMaxRendererProcessCount(); |
| 292 }; | 288 }; |
| 293 | 289 |
| 294 } // namespace content. | 290 } // namespace content. |
| 295 | 291 |
| 296 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 292 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |