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 "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 BlobStorageHost; | |
| 26 class BrowserContext; | 27 class BrowserContext; |
| 27 class BrowserMessageFilter; | 28 class BrowserMessageFilter; |
| 29 class FileAPIMessageFilter; | |
| 28 class RenderProcessHostObserver; | 30 class RenderProcessHostObserver; |
| 29 class RenderWidgetHost; | 31 class RenderWidgetHost; |
| 30 class StoragePartition; | 32 class StoragePartition; |
| 31 struct GlobalRequestID; | 33 struct GlobalRequestID; |
| 32 | 34 |
| 33 // Interface that represents the browser side of the browser <-> renderer | 35 // Interface that represents the browser side of the browser <-> renderer |
| 34 // communication channel. There will generally be one RenderProcessHost per | 36 // communication channel. There will generally be one RenderProcessHost per |
| 35 // renderer process. | 37 // renderer process. |
| 36 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, | 38 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, |
| 37 public IPC::Listener, | 39 public IPC::Listener, |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 208 #endif | 210 #endif |
| 209 | 211 |
| 210 // Tells the ResourceDispatcherHost to resume a deferred navigation without | 212 // Tells the ResourceDispatcherHost to resume a deferred navigation without |
| 211 // transferring it to a new renderer process. | 213 // transferring it to a new renderer process. |
| 212 virtual void ResumeDeferredNavigation(const GlobalRequestID& request_id) = 0; | 214 virtual void ResumeDeferredNavigation(const GlobalRequestID& request_id) = 0; |
| 213 | 215 |
| 214 // Notifies the renderer that the timezone configuration of the system might | 216 // Notifies the renderer that the timezone configuration of the system might |
| 215 // have changed. | 217 // have changed. |
| 216 virtual void NotifyTimezoneChange() = 0; | 218 virtual void NotifyTimezoneChange() = 0; |
| 217 | 219 |
| 220 // Used to coin Blobs in the browser process with correct lifetime semantics. | |
| 221 virtual BlobStorageHost* GetBlobStorageHost() const = 0; | |
|
tommycli
2014/04/29 23:29:26
Plumbing to get the BlobStorageHost.
| |
| 222 | |
| 218 // Static management functions ----------------------------------------------- | 223 // Static management functions ----------------------------------------------- |
| 219 | 224 |
| 220 // Flag to run the renderer in process. This is primarily | 225 // Flag to run the renderer in process. This is primarily |
| 221 // for debugging purposes. When running "in process", the | 226 // for debugging purposes. When running "in process", the |
| 222 // browser maintains a single RenderProcessHost which communicates | 227 // browser maintains a single RenderProcessHost which communicates |
| 223 // to a RenderProcess which is instantiated in the same process | 228 // to a RenderProcess which is instantiated in the same process |
| 224 // with the Browser. All IPC between the Browser and the | 229 // with the Browser. All IPC between the Browser and the |
| 225 // Renderer is the same, it's just not crossing a process boundary. | 230 // Renderer is the same, it's just not crossing a process boundary. |
| 226 | 231 |
| 227 static bool run_renderer_in_process(); | 232 static bool run_renderer_in_process(); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 266 static void SetMaxRendererProcessCount(size_t count); | 271 static void SetMaxRendererProcessCount(size_t count); |
| 267 | 272 |
| 268 // Returns the current max number of renderer processes used by the content | 273 // Returns the current max number of renderer processes used by the content |
| 269 // module. | 274 // module. |
| 270 static size_t GetMaxRendererProcessCount(); | 275 static size_t GetMaxRendererProcessCount(); |
| 271 }; | 276 }; |
| 272 | 277 |
| 273 } // namespace content. | 278 } // namespace content. |
| 274 | 279 |
| 275 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 280 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |