| OLD | NEW |
| 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 #include "content/common/swapped_out_messages.h" | 5 #include "content/common/swapped_out_messages.h" |
| 6 | 6 |
| 7 #include "content/common/accessibility_messages.h" | 7 #include "content/common/accessibility_messages.h" |
| 8 #include "content/common/frame_messages.h" |
| 8 #include "content/common/input_messages.h" | 9 #include "content/common/input_messages.h" |
| 9 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
| 10 #include "content/public/common/content_client.h" | 11 #include "content/public/common/content_client.h" |
| 11 | 12 |
| 12 namespace content { | 13 namespace content { |
| 13 | 14 |
| 14 bool SwappedOutMessages::CanSendWhileSwappedOut(const IPC::Message* msg) { | 15 bool SwappedOutMessages::CanSendWhileSwappedOut(const IPC::Message* msg) { |
| 15 // We filter out most IPC messages when swapped out. However, some are | 16 // We filter out most IPC messages when swapped out. However, some are |
| 16 // important (e.g., ACKs) for keeping the browser and renderer state | 17 // important (e.g., ACKs) for keeping the browser and renderer state |
| 17 // consistent in case we later return to the same renderer. | 18 // consistent in case we later return to the same renderer. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 28 case ViewHostMsg_ShouldClose_ACK::ID: | 29 case ViewHostMsg_ShouldClose_ACK::ID: |
| 29 case ViewHostMsg_SwapOut_ACK::ID: | 30 case ViewHostMsg_SwapOut_ACK::ID: |
| 30 case ViewHostMsg_ClosePage_ACK::ID: | 31 case ViewHostMsg_ClosePage_ACK::ID: |
| 31 case ViewHostMsg_DomOperationResponse::ID: | 32 case ViewHostMsg_DomOperationResponse::ID: |
| 32 case ViewHostMsg_SwapCompositorFrame::ID: | 33 case ViewHostMsg_SwapCompositorFrame::ID: |
| 33 case ViewHostMsg_UpdateIsDelayed::ID: | 34 case ViewHostMsg_UpdateIsDelayed::ID: |
| 34 case ViewHostMsg_DidActivateAcceleratedCompositing::ID: | 35 case ViewHostMsg_DidActivateAcceleratedCompositing::ID: |
| 35 // Allow cross-process JavaScript calls. | 36 // Allow cross-process JavaScript calls. |
| 36 case ViewHostMsg_RouteCloseEvent::ID: | 37 case ViewHostMsg_RouteCloseEvent::ID: |
| 37 case ViewHostMsg_RouteMessageEvent::ID: | 38 case ViewHostMsg_RouteMessageEvent::ID: |
| 39 // Frame detach must occur after the RenderView has swapped out. |
| 40 case FrameHostMsg_Detach::ID: |
| 38 return true; | 41 return true; |
| 39 default: | 42 default: |
| 40 break; | 43 break; |
| 41 } | 44 } |
| 42 | 45 |
| 43 // Check with the embedder as well. | 46 // Check with the embedder as well. |
| 44 ContentClient* client = GetContentClient(); | 47 ContentClient* client = GetContentClient(); |
| 45 return client->CanSendWhileSwappedOut(msg); | 48 return client->CanSendWhileSwappedOut(msg); |
| 46 } | 49 } |
| 47 | 50 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 default: | 88 default: |
| 86 break; | 89 break; |
| 87 } | 90 } |
| 88 | 91 |
| 89 // Check with the embedder as well. | 92 // Check with the embedder as well. |
| 90 ContentClient* client = GetContentClient(); | 93 ContentClient* client = GetContentClient(); |
| 91 return client->CanHandleWhileSwappedOut(msg); | 94 return client->CanHandleWhileSwappedOut(msg); |
| 92 } | 95 } |
| 93 | 96 |
| 94 } // namespace content | 97 } // namespace content |
| OLD | NEW |