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

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

Issue 13529027: Switch Linux Auru ports over to POSIX SHM instead of legacy SYSV SHM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 7 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
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // corresponding functions in RenderProcessHost. See those declarations 126 // corresponding functions in RenderProcessHost. See those declarations
127 // for documentation. 127 // for documentation.
128 void SimulateSwapOutACK(const ViewMsg_SwapOut_Params& params); 128 void SimulateSwapOutACK(const ViewMsg_SwapOut_Params& params);
129 bool WaitForBackingStoreMsg(int render_widget_id, 129 bool WaitForBackingStoreMsg(int render_widget_id,
130 const base::TimeDelta& max_delay, 130 const base::TimeDelta& max_delay,
131 IPC::Message* msg); 131 IPC::Message* msg);
132 // Called to resume the requests for a view after it's ready. The view was 132 // Called to resume the requests for a view after it's ready. The view was
133 // created by CreateNewWindow which initially blocked the requests. 133 // created by CreateNewWindow which initially blocked the requests.
134 void ResumeRequestsForView(int route_id); 134 void ResumeRequestsForView(int route_id);
135 135
136 #if defined(OS_MACOSX) 136 #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. 137 // Given the id of a transport DIB, return a mapping to it or NULL on error.
138 TransportDIB* MapTransportDIB(TransportDIB::Id dib_id); 138 TransportDIB* MapTransportDIB(TransportDIB::Id dib_id);
139 #endif 139 #endif
140 140
141 // IO THREAD ONLY ----------------------------------------------------------- 141 // IO THREAD ONLY -----------------------------------------------------------
142 142
143 // Called on the IO thread when a BackingStore message is received. 143 // Called on the IO thread when a BackingStore message is received.
144 void DidReceiveBackingStoreMsg(const IPC::Message& msg); 144 void DidReceiveBackingStoreMsg(const IPC::Message& msg);
145 145
146 void CreateNewWindow( 146 void CreateNewWindow(
147 const ViewHostMsg_CreateWindow_Params& params, 147 const ViewHostMsg_CreateWindow_Params& params,
148 bool no_javascript_access, 148 bool no_javascript_access,
149 base::ProcessHandle render_process, 149 base::ProcessHandle render_process,
150 int* route_id, 150 int* route_id,
151 int* surface_id, 151 int* surface_id,
152 SessionStorageNamespace* session_storage_namespace); 152 SessionStorageNamespace* session_storage_namespace);
153 void CreateNewWidget(int opener_id, 153 void CreateNewWidget(int opener_id,
154 WebKit::WebPopupType popup_type, 154 WebKit::WebPopupType popup_type,
155 int* route_id, 155 int* route_id,
156 int* surface_id); 156 int* surface_id);
157 void CreateNewFullscreenWidget(int opener_id, int* route_id, int* surface_id); 157 void CreateNewFullscreenWidget(int opener_id, int* route_id, int* surface_id);
158 158
159 #if defined(OS_MACOSX) 159 #if defined(OS_POSIX)
160 // Called on the IO thread to handle the allocation of a TransportDIB. If 160 // Called on the IO thread to handle the allocation of a TransportDIB. If
161 // |cache_in_browser| is |true|, then a copy of the shmem is kept by the 161 // |cache_in_browser| is |true|, then a copy of the shmem is kept by the
162 // browser, and it is the caller's repsonsibility to call 162 // browser, and it is the caller's repsonsibility to call
163 // FreeTransportDIB(). In all cases, the caller is responsible for deleting 163 // FreeTransportDIB(). In all cases, the caller is responsible for deleting
164 // the resulting TransportDIB. 164 // the resulting TransportDIB.
165 void AllocTransportDIB(size_t size, 165 void AllocTransportDIB(size_t size,
166 bool cache_in_browser, 166 bool cache_in_browser,
167 TransportDIB::Handle* result); 167 TransportDIB::Handle* result);
168 168
169 // Called on the IO thread to handle the freeing of a transport DIB 169 // Called on the IO thread to handle the freeing of a transport DIB
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 int route_id, 206 int route_id,
207 WebKit::WebPopupType popup_type); 207 WebKit::WebPopupType popup_type);
208 208
209 // Called on the UI thread to create a fullscreen widget. 209 // Called on the UI thread to create a fullscreen widget.
210 void OnCreateFullscreenWidgetOnUI(int opener_id, int route_id); 210 void OnCreateFullscreenWidgetOnUI(int opener_id, int route_id);
211 211
212 // Called on the IO thread to resume a cross-site response, if the ack is 212 // Called on the IO thread to resume a cross-site response, if the ack is
213 // not received as expected. 213 // not received as expected.
214 void OnSimulateSwapOutACK(const ViewMsg_SwapOut_Params& params); 214 void OnSimulateSwapOutACK(const ViewMsg_SwapOut_Params& params);
215 215
216 #if defined(OS_MACOSX) 216 #if defined(OS_POSIX)
217 // Called on destruction to release all allocated transport DIBs 217 // Called on destruction to release all allocated transport DIBs
218 void ClearAllocatedDIBs(); 218 void ClearAllocatedDIBs();
219 219
220 // On OSX we keep file descriptors to all the allocated DIBs around until 220 // On POSIX we keep file descriptors to all the allocated DIBs around until
221 // the renderer frees them. 221 // the renderer frees them.
222 base::Lock allocated_dibs_lock_; 222 base::Lock allocated_dibs_lock_;
223 std::map<TransportDIB::Id, int> allocated_dibs_; 223 std::map<TransportDIB::Id, int> allocated_dibs_;
224 #endif 224 #endif
225 225
226 // A map of live paint messages. Must hold pending_paints_lock_ to access. 226 // A map of live paint messages. Must hold pending_paints_lock_ to access.
227 // The BackingStoreMsgProxy objects are not owned by this map. (See 227 // The BackingStoreMsgProxy objects are not owned by this map. (See
228 // BackingStoreMsgProxy for details about how the lifetime of instances are 228 // BackingStoreMsgProxy for details about how the lifetime of instances are
229 // managed.) 229 // managed.)
230 BackingStoreMsgProxyMap pending_paints_; 230 BackingStoreMsgProxyMap pending_paints_;
231 base::Lock pending_paints_lock_; 231 base::Lock pending_paints_lock_;
232 232
233 int render_process_id_; 233 int render_process_id_;
234 234
235 // Event used to implement WaitForBackingStoreMsg. 235 // Event used to implement WaitForBackingStoreMsg.
236 base::WaitableEvent event_; 236 base::WaitableEvent event_;
237 237
238 // The next routing id to use. 238 // The next routing id to use.
239 base::AtomicSequenceNumber next_routing_id_; 239 base::AtomicSequenceNumber next_routing_id_;
240 240
241 ResourceDispatcherHostImpl* resource_dispatcher_host_; 241 ResourceDispatcherHostImpl* resource_dispatcher_host_;
242 242
243 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); 243 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper);
244 }; 244 };
245 245
246 } // namespace content 246 } // namespace content
247 247
248 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ 248 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698