OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "content/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
207 IPC_MESSAGE_HANDLER(ViewMsg_PaintAtSize, OnMsgPaintAtSize) | 207 IPC_MESSAGE_HANDLER(ViewMsg_PaintAtSize, OnMsgPaintAtSize) |
208 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnMsgRepaint) | 208 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnMsgRepaint) |
209 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) | 209 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) |
210 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) | 210 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) |
211 IPC_MESSAGE_UNHANDLED(handled = false) | 211 IPC_MESSAGE_UNHANDLED(handled = false) |
212 IPC_END_MESSAGE_MAP() | 212 IPC_END_MESSAGE_MAP() |
213 return handled; | 213 return handled; |
214 } | 214 } |
215 | 215 |
216 bool RenderWidget::Send(IPC::Message* message) { | 216 bool RenderWidget::Send(IPC::Message* message) { |
217 // Don't send any messages after the browser has told us to close, and filter | 217 // Don't send any messages after the browser has told us to close. |
218 // most outgoing messages while swapped out. | 218 if (closing_) { |
Charlie Reis
2011/12/12 22:20:36
We don't want to remove this anymore, do we?
supersat
2011/12/15 19:30:49
Nope.
| |
219 if ((is_swapped_out_ && | |
220 !content::SwappedOutMessages::CanSendWhileSwappedOut(message)) || | |
221 closing_) { | |
222 delete message; | 219 delete message; |
223 return false; | 220 return false; |
224 } | 221 } |
225 | 222 |
226 // If given a messsage without a routing ID, then assign our routing ID. | 223 // If given a messsage without a routing ID, then assign our routing ID. |
227 if (message->routing_id() == MSG_ROUTING_NONE) | 224 if (message->routing_id() == MSG_ROUTING_NONE) |
228 message->set_routing_id(routing_id_); | 225 message->set_routing_id(routing_id_); |
229 | 226 |
230 return RenderThread::Get()->Send(message); | 227 return RenderThread::Get()->Send(message); |
231 } | 228 } |
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1503 } | 1500 } |
1504 } | 1501 } |
1505 | 1502 |
1506 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { | 1503 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { |
1507 return false; | 1504 return false; |
1508 } | 1505 } |
1509 | 1506 |
1510 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 1507 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
1511 return false; | 1508 return false; |
1512 } | 1509 } |
OLD | NEW |