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

Side by Side Diff: content/browser/renderer_host/render_widget_helper.h

Issue 15682009: Eliminate SwapOut message parameters, keeping state in RVHM instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to get Android build fix Created 7 years, 6 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) 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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 10
11 #include "base/atomic_sequence_num.h" 11 #include "base/atomic_sequence_num.h"
12 #include "base/containers/hash_tables.h" 12 #include "base/containers/hash_tables.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/process.h" 14 #include "base/process.h"
15 #include "base/synchronization/lock.h" 15 #include "base/synchronization/lock.h"
16 #include "base/synchronization/waitable_event.h" 16 #include "base/synchronization/waitable_event.h"
17 #include "content/public/browser/browser_thread.h" 17 #include "content/public/browser/browser_thread.h"
18 #include "content/public/browser/content_browser_client.h" 18 #include "content/public/browser/content_browser_client.h"
19 #include "content/public/browser/global_request_id.h"
19 #include "content/public/common/window_container_type.h" 20 #include "content/public/common/window_container_type.h"
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h"
21 #include "ui/gfx/native_widget_types.h" 22 #include "ui/gfx/native_widget_types.h"
22 #include "ui/surface/transport_dib.h" 23 #include "ui/surface/transport_dib.h"
23 24
24 namespace IPC { 25 namespace IPC {
25 class Message; 26 class Message;
26 } 27 }
27 28
28 namespace base { 29 namespace base {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // Lookup the RenderWidgetHelper from the render_process_host_id. Returns NULL 119 // Lookup the RenderWidgetHelper from the render_process_host_id. Returns NULL
119 // if not found. NOTE: The raw pointer is for temporary use only. To retain, 120 // if not found. NOTE: The raw pointer is for temporary use only. To retain,
120 // store in a scoped_refptr. 121 // store in a scoped_refptr.
121 static RenderWidgetHelper* FromProcessHostID(int render_process_host_id); 122 static RenderWidgetHelper* FromProcessHostID(int render_process_host_id);
122 123
123 // UI THREAD ONLY ----------------------------------------------------------- 124 // UI THREAD ONLY -----------------------------------------------------------
124 125
125 // These three functions provide the backend implementation of the 126 // These three functions provide the backend implementation of the
126 // corresponding functions in RenderProcessHost. See those declarations 127 // corresponding functions in RenderProcessHost. See those declarations
127 // for documentation. 128 // for documentation.
128 void SimulateSwapOutACK(const ViewMsg_SwapOut_Params& params); 129 void ResumeDeferredNavigation(const GlobalRequestID& request_id);
129 bool WaitForBackingStoreMsg(int render_widget_id, 130 bool WaitForBackingStoreMsg(int render_widget_id,
130 const base::TimeDelta& max_delay, 131 const base::TimeDelta& max_delay,
131 IPC::Message* msg); 132 IPC::Message* msg);
132 // Called to resume the requests for a view after it's ready. The view was 133 // Called to resume the requests for a view after it's ready. The view was
133 // created by CreateNewWindow which initially blocked the requests. 134 // created by CreateNewWindow which initially blocked the requests.
134 void ResumeRequestsForView(int route_id); 135 void ResumeRequestsForView(int route_id);
135 136
136 #if defined(OS_POSIX) && !defined(TOOLKIT_GTK) && !defined(OS_ANDROID) 137 #if defined(OS_POSIX) && !defined(TOOLKIT_GTK) && !defined(OS_ANDROID)
137 // Given the id of a transport DIB, return a mapping to it or NULL on error. 138 // Given the id of a transport DIB, return a mapping to it or NULL on error.
138 TransportDIB* MapTransportDIB(TransportDIB::Id dib_id); 139 TransportDIB* MapTransportDIB(TransportDIB::Id dib_id);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 void OnResumeRequestsForView(int route_id); 205 void OnResumeRequestsForView(int route_id);
205 206
206 // Called on the UI thread to finish creating a widget. 207 // Called on the UI thread to finish creating a widget.
207 void OnCreateWidgetOnUI(int opener_id, 208 void OnCreateWidgetOnUI(int opener_id,
208 int route_id, 209 int route_id,
209 WebKit::WebPopupType popup_type); 210 WebKit::WebPopupType popup_type);
210 211
211 // Called on the UI thread to create a fullscreen widget. 212 // Called on the UI thread to create a fullscreen widget.
212 void OnCreateFullscreenWidgetOnUI(int opener_id, int route_id); 213 void OnCreateFullscreenWidgetOnUI(int opener_id, int route_id);
213 214
214 // Called on the IO thread to resume a cross-site response, if the ack is 215 // Called on the IO thread to resume a paused navigation in the network
215 // not received as expected. 216 // stack without transferring it to a new renderer process.
216 void OnSimulateSwapOutACK(const ViewMsg_SwapOut_Params& params); 217 void OnResumeDeferredNavigation(const GlobalRequestID& request_id);
217 218
218 #if defined(OS_POSIX) 219 #if defined(OS_POSIX)
219 // Called on destruction to release all allocated transport DIBs 220 // Called on destruction to release all allocated transport DIBs
220 void ClearAllocatedDIBs(); 221 void ClearAllocatedDIBs();
221 222
222 // On POSIX we keep file descriptors to all the allocated DIBs around until 223 // On POSIX we keep file descriptors to all the allocated DIBs around until
223 // the renderer frees them. 224 // the renderer frees them.
224 base::Lock allocated_dibs_lock_; 225 base::Lock allocated_dibs_lock_;
225 std::map<TransportDIB::Id, int> allocated_dibs_; 226 std::map<TransportDIB::Id, int> allocated_dibs_;
226 #endif 227 #endif
(...skipping 14 matching lines...) Expand all
241 base::AtomicSequenceNumber next_routing_id_; 242 base::AtomicSequenceNumber next_routing_id_;
242 243
243 ResourceDispatcherHostImpl* resource_dispatcher_host_; 244 ResourceDispatcherHostImpl* resource_dispatcher_host_;
244 245
245 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); 246 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper);
246 }; 247 };
247 248
248 } // namespace content 249 } // namespace content
249 250
250 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ 251 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_unittest.cc ('k') | content/browser/renderer_host/render_widget_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698