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/frame_messages.h" |
9 #include "content/common/input_messages.h" | 9 #include "content/common/input_messages.h" |
10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
11 #include "content/public/common/content_client.h" | 11 #include "content/public/common/content_client.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 bool SwappedOutMessages::CanSendWhileSwappedOut(const IPC::Message* msg) { | 15 bool SwappedOutMessages::CanSendWhileSwappedOut(const IPC::Message* msg) { |
16 // 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 |
17 // important (e.g., ACKs) for keeping the browser and renderer state | 17 // important (e.g., ACKs) for keeping the browser and renderer state |
18 // consistent in case we later return to the same renderer. | 18 // consistent in case we later return to the same renderer. |
19 switch (msg->type()) { | 19 switch (msg->type()) { |
20 // Handled by RenderWidgetHost. | 20 // Handled by RenderWidgetHost. |
21 case InputHostMsg_HandleInputEvent_ACK::ID: | 21 case InputHostMsg_HandleInputEvent_ACK::ID: |
22 case ViewHostMsg_PaintAtSize_ACK::ID: | |
23 case ViewHostMsg_UpdateRect::ID: | 22 case ViewHostMsg_UpdateRect::ID: |
24 // Allow targeted navigations while swapped out. | 23 // Allow targeted navigations while swapped out. |
25 case ViewHostMsg_OpenURL::ID: | 24 case ViewHostMsg_OpenURL::ID: |
26 case ViewHostMsg_Focus::ID: | 25 case ViewHostMsg_Focus::ID: |
27 // Handled by RenderViewHost. | 26 // Handled by RenderViewHost. |
28 case ViewHostMsg_RenderProcessGone::ID: | 27 case ViewHostMsg_RenderProcessGone::ID: |
29 case ViewHostMsg_ShouldClose_ACK::ID: | 28 case ViewHostMsg_ShouldClose_ACK::ID: |
30 case ViewHostMsg_SwapOut_ACK::ID: | 29 case ViewHostMsg_SwapOut_ACK::ID: |
31 case ViewHostMsg_ClosePage_ACK::ID: | 30 case ViewHostMsg_ClosePage_ACK::ID: |
32 case ViewHostMsg_DomOperationResponse::ID: | 31 case ViewHostMsg_DomOperationResponse::ID: |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 default: | 94 default: |
96 break; | 95 break; |
97 } | 96 } |
98 | 97 |
99 // Check with the embedder as well. | 98 // Check with the embedder as well. |
100 ContentClient* client = GetContentClient(); | 99 ContentClient* client = GetContentClient(); |
101 return client->CanHandleWhileSwappedOut(msg); | 100 return client->CanHandleWhileSwappedOut(msg); |
102 } | 101 } |
103 | 102 |
104 } // namespace content | 103 } // namespace content |
OLD | NEW |