OLD | NEW |
1 | 1 |
2 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 2 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 | 5 |
6 #ifndef CHROME_BROWSER_RENDER_WIDGET_HELPER_H__ | 6 #ifndef CHROME_BROWSER_RENDER_WIDGET_HELPER_H__ |
7 #define CHROME_BROWSER_RENDER_WIDGET_HELPER_H__ | 7 #define CHROME_BROWSER_RENDER_WIDGET_HELPER_H__ |
8 | 8 |
9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
11 #include "base/ref_counted.h" | 11 #include "base/ref_counted.h" |
12 #include "base/lock.h" | 12 #include "base/lock.h" |
13 | 13 |
14 namespace IPC { | 14 namespace IPC { |
15 class Message; | 15 class Message; |
16 } | 16 } |
17 | 17 |
| 18 namespace base { |
| 19 class TimeDelta; |
| 20 } |
| 21 |
18 class MessageLoop; | 22 class MessageLoop; |
19 class ResourceDispatcherHost; | 23 class ResourceDispatcherHost; |
20 class TimeDelta; | |
21 | 24 |
22 // Instantiated per RenderProcessHost to provide various optimizations on | 25 // Instantiated per RenderProcessHost to provide various optimizations on |
23 // behalf of a RenderWidgetHost. This class bridges between the IO thread | 26 // behalf of a RenderWidgetHost. This class bridges between the IO thread |
24 // where the RenderProcessHost's MessageFilter lives and the UI thread where | 27 // where the RenderProcessHost's MessageFilter lives and the UI thread where |
25 // the RenderWidgetHost lives. | 28 // the RenderWidgetHost lives. |
26 // | 29 // |
27 // | 30 // |
28 // OPTIMIZED RESIZE | 31 // OPTIMIZED RESIZE |
29 // | 32 // |
30 // RenderWidgetHelper is used to implement optimized resize. When the | 33 // RenderWidgetHelper is used to implement optimized resize. When the |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // Called on the UI thread to simulate a ClosePage_ACK message to the | 93 // Called on the UI thread to simulate a ClosePage_ACK message to the |
91 // ResourceDispatcherHost. Necessary for a cross-site request, in the case | 94 // ResourceDispatcherHost. Necessary for a cross-site request, in the case |
92 // that the original RenderViewHost is not live and thus cannot run an | 95 // that the original RenderViewHost is not live and thus cannot run an |
93 // onunload handler. | 96 // onunload handler. |
94 void CrossSiteClosePageACK(int new_render_process_host_id, | 97 void CrossSiteClosePageACK(int new_render_process_host_id, |
95 int new_request_id); | 98 int new_request_id); |
96 | 99 |
97 // Called on the UI thread to wait for the next PaintRect message for the | 100 // Called on the UI thread to wait for the next PaintRect message for the |
98 // specified render widget. Returns true if successful, and the msg out- | 101 // specified render widget. Returns true if successful, and the msg out- |
99 // param will contain a copy of the received PaintRect message. | 102 // param will contain a copy of the received PaintRect message. |
100 bool WaitForPaintMsg(int render_widget_id, const TimeDelta& max_delay, | 103 bool WaitForPaintMsg(int render_widget_id, const base::TimeDelta& max_delay, |
101 IPC::Message* msg); | 104 IPC::Message* msg); |
102 | 105 |
103 | 106 |
104 // IO THREAD ONLY ----------------------------------------------------------- | 107 // IO THREAD ONLY ----------------------------------------------------------- |
105 | 108 |
106 // Called on the IO thread when a PaintRect message is received. | 109 // Called on the IO thread when a PaintRect message is received. |
107 void DidReceivePaintMsg(const IPC::Message& msg); | 110 void DidReceivePaintMsg(const IPC::Message& msg); |
108 | 111 |
109 MessageLoop* ui_loop() { return ui_loop_; } | 112 MessageLoop* ui_loop() { return ui_loop_; } |
110 | 113 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 // The next routing id to use. | 157 // The next routing id to use. |
155 base::AtomicSequenceNumber next_routing_id_; | 158 base::AtomicSequenceNumber next_routing_id_; |
156 | 159 |
157 // Whether popup blocking is enabled or not. | 160 // Whether popup blocking is enabled or not. |
158 bool block_popups_; | 161 bool block_popups_; |
159 | 162 |
160 DISALLOW_EVIL_CONSTRUCTORS(RenderWidgetHelper); | 163 DISALLOW_EVIL_CONSTRUCTORS(RenderWidgetHelper); |
161 }; | 164 }; |
162 | 165 |
163 #endif // CHROME_BROWSER_RENDER_WIDGET_HELPER_H__ | 166 #endif // CHROME_BROWSER_RENDER_WIDGET_HELPER_H__ |
OLD | NEW |