| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| 11 #include "base/id_map.h" | 11 #include "base/id_map.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/process.h" | 13 #include "base/process.h" |
| 14 #include "base/process_util.h" | 14 #include "base/process_util.h" |
| 15 #include "base/time.h" | 15 #include "base/time.h" |
| 16 #include "ipc/ipc_sync_channel.h" | 16 #include "ipc/ipc_sync_channel.h" |
| 17 #include "ui/gfx/surface/transport_dib.h" | 17 #include "ui/gfx/surface/transport_dib.h" |
| 18 | 18 |
| 19 class Profile; | 19 class Profile; |
| 20 struct ViewMsg_ClosePage_Params; | 20 struct ViewMsg_SwapOut_Params; |
| 21 | 21 |
| 22 namespace base { | 22 namespace base { |
| 23 class SharedMemory; | 23 class SharedMemory; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace net { | 26 namespace net { |
| 27 class URLRequestContextGetter; | 27 class URLRequestContextGetter; |
| 28 } | 28 } |
| 29 | 29 |
| 30 // Virtual interface that represents the browser side of the browser <-> | 30 // Virtual interface that represents the browser side of the browser <-> |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 virtual bool Init( | 160 virtual bool Init( |
| 161 bool is_accessibility_enabled, bool is_extensions_process) = 0; | 161 bool is_accessibility_enabled, bool is_extensions_process) = 0; |
| 162 | 162 |
| 163 // Gets the next available routing id. | 163 // Gets the next available routing id. |
| 164 virtual int GetNextRoutingID() = 0; | 164 virtual int GetNextRoutingID() = 0; |
| 165 | 165 |
| 166 // Called on the UI thread to cancel any outstanding resource requests for | 166 // Called on the UI thread to cancel any outstanding resource requests for |
| 167 // the specified render widget. | 167 // the specified render widget. |
| 168 virtual void CancelResourceRequests(int render_widget_id) = 0; | 168 virtual void CancelResourceRequests(int render_widget_id) = 0; |
| 169 | 169 |
| 170 // Called on the UI thread to simulate a ClosePage_ACK message to the | 170 // Called on the UI thread to simulate a SwapOut_ACK message to the |
| 171 // ResourceDispatcherHost. Necessary for a cross-site request, in the case | 171 // ResourceDispatcherHost. Necessary for a cross-site request, in the case |
| 172 // that the original RenderViewHost is not live and thus cannot run an | 172 // that the original RenderViewHost is not live and thus cannot run an |
| 173 // onunload handler. | 173 // unload handler. |
| 174 virtual void CrossSiteClosePageACK( | 174 virtual void CrossSiteSwapOutACK( |
| 175 const ViewMsg_ClosePage_Params& params) = 0; | 175 const ViewMsg_SwapOut_Params& params) = 0; |
| 176 | 176 |
| 177 // Called on the UI thread to wait for the next UpdateRect message for the | 177 // Called on the UI thread to wait for the next UpdateRect message for the |
| 178 // specified render widget. Returns true if successful, and the msg out- | 178 // specified render widget. Returns true if successful, and the msg out- |
| 179 // param will contain a copy of the received UpdateRect message. | 179 // param will contain a copy of the received UpdateRect message. |
| 180 virtual bool WaitForUpdateMsg(int render_widget_id, | 180 virtual bool WaitForUpdateMsg(int render_widget_id, |
| 181 const base::TimeDelta& max_delay, | 181 const base::TimeDelta& max_delay, |
| 182 IPC::Message* msg) = 0; | 182 IPC::Message* msg) = 0; |
| 183 | 183 |
| 184 // Called when a received message cannot be decoded. | 184 // Called when a received message cannot be decoded. |
| 185 virtual void ReceivedBadMessage() = 0; | 185 virtual void ReceivedBadMessage() = 0; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 // Factory object for RenderProcessHosts. Using this factory allows tests to | 309 // Factory object for RenderProcessHosts. Using this factory allows tests to |
| 310 // swap out a different one to use a TestRenderProcessHost. | 310 // swap out a different one to use a TestRenderProcessHost. |
| 311 class RenderProcessHostFactory { | 311 class RenderProcessHostFactory { |
| 312 public: | 312 public: |
| 313 virtual ~RenderProcessHostFactory() {} | 313 virtual ~RenderProcessHostFactory() {} |
| 314 virtual RenderProcessHost* CreateRenderProcessHost( | 314 virtual RenderProcessHost* CreateRenderProcessHost( |
| 315 Profile* profile) const = 0; | 315 Profile* profile) const = 0; |
| 316 }; | 316 }; |
| 317 | 317 |
| 318 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ | 318 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |