| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 IPC_MESSAGE_HANDLER(ViewMsg_PaintAtSize, OnMsgPaintAtSize) | 206 IPC_MESSAGE_HANDLER(ViewMsg_PaintAtSize, OnMsgPaintAtSize) |
| 207 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnMsgRepaint) | 207 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnMsgRepaint) |
| 208 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) | 208 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) |
| 209 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) | 209 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) |
| 210 IPC_MESSAGE_UNHANDLED(handled = false) | 210 IPC_MESSAGE_UNHANDLED(handled = false) |
| 211 IPC_END_MESSAGE_MAP() | 211 IPC_END_MESSAGE_MAP() |
| 212 return handled; | 212 return handled; |
| 213 } | 213 } |
| 214 | 214 |
| 215 bool RenderWidget::Send(IPC::Message* message) { | 215 bool RenderWidget::Send(IPC::Message* message) { |
| 216 // Don't send any messages after the browser has told us to close, and filter | 216 // Don't send any messages after the browser has told us to close. |
| 217 // most outgoing messages while swapped out. | 217 if (closing_) { |
| 218 if ((is_swapped_out_ && | |
| 219 !content::SwappedOutMessages::CanSendWhileSwappedOut(message)) || | |
| 220 closing_) { | |
| 221 delete message; | 218 delete message; |
| 222 return false; | 219 return false; |
| 223 } | 220 } |
| 224 | 221 |
| 225 // If given a messsage without a routing ID, then assign our routing ID. | 222 // If given a messsage without a routing ID, then assign our routing ID. |
| 226 if (message->routing_id() == MSG_ROUTING_NONE) | 223 if (message->routing_id() == MSG_ROUTING_NONE) |
| 227 message->set_routing_id(routing_id_); | 224 message->set_routing_id(routing_id_); |
| 228 | 225 |
| 229 return RenderThread::Get()->Send(message); | 226 return RenderThread::Get()->Send(message); |
| 230 } | 227 } |
| (...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1484 } | 1481 } |
| 1485 } | 1482 } |
| 1486 | 1483 |
| 1487 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { | 1484 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { |
| 1488 return false; | 1485 return false; |
| 1489 } | 1486 } |
| 1490 | 1487 |
| 1491 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 1488 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
| 1492 return false; | 1489 return false; |
| 1493 } | 1490 } |
| OLD | NEW |