Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Side by Side Diff: chrome/browser/renderer_host/render_process_host.h

Issue 159255: Fix a race condition where rapid back/forward clicks could close a tab... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/id_map.h" 11 #include "base/id_map.h"
12 #include "base/process.h" 12 #include "base/process.h"
13 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
14 #include "chrome/common/transport_dib.h" 14 #include "chrome/common/transport_dib.h"
15 #include "chrome/common/visitedlink_common.h" 15 #include "chrome/common/visitedlink_common.h"
16 #include "ipc/ipc_sync_channel.h" 16 #include "ipc/ipc_sync_channel.h"
17 17
18 class Profile; 18 class Profile;
19 struct ViewMsg_ClosePage_Params;
19 20
20 // Virtual interface that represents the browser side of the browser <-> 21 // Virtual interface that represents the browser side of the browser <->
21 // renderer communication channel. There will generally be one 22 // renderer communication channel. There will generally be one
22 // RenderProcessHost per renderer process. 23 // RenderProcessHost per renderer process.
23 // 24 //
24 // The concrete implementation of this class for normal use is the 25 // The concrete implementation of this class for normal use is the
25 // BrowserRenderProcessHost. It may also be implemented by a testing interface 26 // BrowserRenderProcessHost. It may also be implemented by a testing interface
26 // for mocking purposes. 27 // for mocking purposes.
27 class RenderProcessHost : public IPC::Channel::Sender, 28 class RenderProcessHost : public IPC::Channel::Sender,
28 public IPC::Channel::Listener { 29 public IPC::Channel::Listener {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 virtual int GetNextRoutingID() = 0; 112 virtual int GetNextRoutingID() = 0;
112 113
113 // Called on the UI thread to cancel any outstanding resource requests for 114 // Called on the UI thread to cancel any outstanding resource requests for
114 // the specified render widget. 115 // the specified render widget.
115 virtual void CancelResourceRequests(int render_widget_id) = 0; 116 virtual void CancelResourceRequests(int render_widget_id) = 0;
116 117
117 // Called on the UI thread to simulate a ClosePage_ACK message to the 118 // Called on the UI thread to simulate a ClosePage_ACK message to the
118 // ResourceDispatcherHost. Necessary for a cross-site request, in the case 119 // ResourceDispatcherHost. Necessary for a cross-site request, in the case
119 // that the original RenderViewHost is not live and thus cannot run an 120 // that the original RenderViewHost is not live and thus cannot run an
120 // onunload handler. 121 // onunload handler.
121 virtual void CrossSiteClosePageACK(int new_render_process_host_id, 122 virtual void CrossSiteClosePageACK(
122 int new_request_id) = 0; 123 const ViewMsg_ClosePage_Params& params) = 0;
123 124
124 // Called on the UI thread to wait for the next PaintRect message for the 125 // Called on the UI thread to wait for the next PaintRect message for the
125 // specified render widget. Returns true if successful, and the msg out- 126 // specified render widget. Returns true if successful, and the msg out-
126 // param will contain a copy of the received PaintRect message. 127 // param will contain a copy of the received PaintRect message.
127 virtual bool WaitForPaintMsg(int render_widget_id, 128 virtual bool WaitForPaintMsg(int render_widget_id,
128 const base::TimeDelta& max_delay, 129 const base::TimeDelta& max_delay,
129 IPC::Message* msg) = 0; 130 IPC::Message* msg) = 0;
130 131
131 // Called when a received message cannot be decoded. 132 // Called when a received message cannot be decoded.
132 virtual void ReceivedBadMessage(uint16 msg_type) = 0; 133 virtual void ReceivedBadMessage(uint16 msg_type) = 0;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // Factory object for RenderProcessHosts. Using this factory allows tests to 251 // Factory object for RenderProcessHosts. Using this factory allows tests to
251 // swap out a different one to use a TestRenderProcessHost. 252 // swap out a different one to use a TestRenderProcessHost.
252 class RenderProcessHostFactory { 253 class RenderProcessHostFactory {
253 public: 254 public:
254 virtual ~RenderProcessHostFactory() {} 255 virtual ~RenderProcessHostFactory() {}
255 virtual RenderProcessHost* CreateRenderProcessHost( 256 virtual RenderProcessHost* CreateRenderProcessHost(
256 Profile* profile) const = 0; 257 Profile* profile) const = 0;
257 }; 258 };
258 259
259 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ 260 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/mock_render_process_host.cc ('k') | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698