OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_WIDGET_HELPER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
11 #include "app/surface/transport_dib.h" | 11 #include "app/surface/transport_dib.h" |
12 #include "base/atomic_sequence_num.h" | 12 #include "base/atomic_sequence_num.h" |
13 #include "base/hash_tables.h" | 13 #include "base/hash_tables.h" |
14 #include "base/process.h" | 14 #include "base/process.h" |
15 #include "base/ref_counted.h" | 15 #include "base/ref_counted.h" |
16 #include "base/lock.h" | 16 #include "base/synchronization/lock.h" |
17 #include "base/synchronization/waitable_event.h" | 17 #include "base/synchronization/waitable_event.h" |
18 #include "chrome/common/window_container_type.h" | 18 #include "chrome/common/window_container_type.h" |
19 #include "third_party/WebKit/WebKit/chromium/public/WebPopupType.h" | 19 #include "third_party/WebKit/WebKit/chromium/public/WebPopupType.h" |
20 | 20 |
21 namespace IPC { | 21 namespace IPC { |
22 class Message; | 22 class Message; |
23 } | 23 } |
24 | 24 |
25 namespace base { | 25 namespace base { |
26 class TimeDelta; | 26 class TimeDelta; |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 | 190 |
191 // Called on the IO thread to resume a cross-site response. | 191 // Called on the IO thread to resume a cross-site response. |
192 void OnCrossSiteClosePageACK(const ViewMsg_ClosePage_Params& params); | 192 void OnCrossSiteClosePageACK(const ViewMsg_ClosePage_Params& params); |
193 | 193 |
194 #if defined(OS_MACOSX) | 194 #if defined(OS_MACOSX) |
195 // Called on destruction to release all allocated transport DIBs | 195 // Called on destruction to release all allocated transport DIBs |
196 void ClearAllocatedDIBs(); | 196 void ClearAllocatedDIBs(); |
197 | 197 |
198 // On OSX we keep file descriptors to all the allocated DIBs around until | 198 // On OSX we keep file descriptors to all the allocated DIBs around until |
199 // the renderer frees them. | 199 // the renderer frees them. |
200 Lock allocated_dibs_lock_; | 200 base::Lock allocated_dibs_lock_; |
201 std::map<TransportDIB::Id, int> allocated_dibs_; | 201 std::map<TransportDIB::Id, int> allocated_dibs_; |
202 #endif | 202 #endif |
203 | 203 |
204 // A map of live paint messages. Must hold pending_paints_lock_ to access. | 204 // A map of live paint messages. Must hold pending_paints_lock_ to access. |
205 // The UpdateMsgProxy objects are not owned by this map. (See UpdateMsgProxy | 205 // The UpdateMsgProxy objects are not owned by this map. (See UpdateMsgProxy |
206 // for details about how the lifetime of instances are managed.) | 206 // for details about how the lifetime of instances are managed.) |
207 UpdateMsgProxyMap pending_paints_; | 207 UpdateMsgProxyMap pending_paints_; |
208 Lock pending_paints_lock_; | 208 base::Lock pending_paints_lock_; |
209 | 209 |
210 int render_process_id_; | 210 int render_process_id_; |
211 | 211 |
212 // Event used to implement WaitForUpdateMsg. | 212 // Event used to implement WaitForUpdateMsg. |
213 base::WaitableEvent event_; | 213 base::WaitableEvent event_; |
214 | 214 |
215 // The next routing id to use. | 215 // The next routing id to use. |
216 base::AtomicSequenceNumber next_routing_id_; | 216 base::AtomicSequenceNumber next_routing_id_; |
217 | 217 |
218 ResourceDispatcherHost* resource_dispatcher_host_; | 218 ResourceDispatcherHost* resource_dispatcher_host_; |
219 | 219 |
220 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); | 220 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); |
221 }; | 221 }; |
222 | 222 |
223 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ | 223 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ |
OLD | NEW |