Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: content/common/swapped_out_messages.cc

Issue 109653014: Allow RenderFrames to swap out for subframe navigations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix an error during merge. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/frame_messages.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 RenderWidget. 20 // Handled by RenderWidgetHost.
21 case InputHostMsg_HandleInputEvent_ACK::ID: 21 case InputHostMsg_HandleInputEvent_ACK::ID:
22 case ViewHostMsg_PaintAtSize_ACK::ID: 22 case ViewHostMsg_PaintAtSize_ACK::ID:
23 case ViewHostMsg_UpdateRect::ID: 23 case ViewHostMsg_UpdateRect::ID:
24 // Allow targeted navigations while swapped out. 24 // Allow targeted navigations while swapped out.
25 case ViewHostMsg_OpenURL::ID: 25 case ViewHostMsg_OpenURL::ID:
26 case ViewHostMsg_Focus::ID: 26 case ViewHostMsg_Focus::ID:
27 // Handled by RenderView. 27 // Handled by RenderViewHost.
28 case ViewHostMsg_RenderProcessGone::ID: 28 case ViewHostMsg_RenderProcessGone::ID:
29 case ViewHostMsg_ShouldClose_ACK::ID: 29 case ViewHostMsg_ShouldClose_ACK::ID:
30 case ViewHostMsg_SwapOut_ACK::ID: 30 case ViewHostMsg_SwapOut_ACK::ID:
31 case ViewHostMsg_ClosePage_ACK::ID: 31 case ViewHostMsg_ClosePage_ACK::ID:
32 case ViewHostMsg_DomOperationResponse::ID: 32 case ViewHostMsg_DomOperationResponse::ID:
33 case ViewHostMsg_SwapCompositorFrame::ID: 33 case ViewHostMsg_SwapCompositorFrame::ID:
34 case ViewHostMsg_UpdateIsDelayed::ID: 34 case ViewHostMsg_UpdateIsDelayed::ID:
35 case ViewHostMsg_DidActivateAcceleratedCompositing::ID: 35 case ViewHostMsg_DidActivateAcceleratedCompositing::ID:
36 // Allow cross-process JavaScript calls. 36 // Allow cross-process JavaScript calls.
37 case ViewHostMsg_RouteCloseEvent::ID: 37 case ViewHostMsg_RouteCloseEvent::ID:
38 case ViewHostMsg_RouteMessageEvent::ID: 38 case ViewHostMsg_RouteMessageEvent::ID:
39 // Handled by RenderFrameHost.
40 case FrameHostMsg_SwapOut_ACK::ID:
39 // Frame detach must occur after the RenderView has swapped out. 41 // Frame detach must occur after the RenderView has swapped out.
40 case FrameHostMsg_Detach::ID: 42 case FrameHostMsg_Detach::ID:
41 return true; 43 return true;
42 default: 44 default:
43 break; 45 break;
44 } 46 }
45 47
46 // Check with the embedder as well. 48 // Check with the embedder as well.
47 ContentClient* client = GetContentClient(); 49 ContentClient* client = GetContentClient();
48 return client->CanSendWhileSwappedOut(msg); 50 return client->CanSendWhileSwappedOut(msg);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 default: 90 default:
89 break; 91 break;
90 } 92 }
91 93
92 // Check with the embedder as well. 94 // Check with the embedder as well.
93 ContentClient* client = GetContentClient(); 95 ContentClient* client = GetContentClient();
94 return client->CanHandleWhileSwappedOut(msg); 96 return client->CanHandleWhileSwappedOut(msg);
95 } 97 }
96 98
97 } // namespace content 99 } // namespace content
OLDNEW
« no previous file with comments | « content/common/frame_messages.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698