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

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

Issue 18339006: Rename RenderViewGone IPC/methods to better reflect reality (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes for reviews by creis@ and palmer@. Created 7 years, 5 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
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/input_messages.h" 8 #include "content/common/input_messages.h"
9 #include "content/common/view_messages.h" 9 #include "content/common/view_messages.h"
10 #include "content/public/common/content_client.h" 10 #include "content/public/common/content_client.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 bool SwappedOutMessages::CanSendWhileSwappedOut(const IPC::Message* msg) { 14 bool SwappedOutMessages::CanSendWhileSwappedOut(const IPC::Message* msg) {
15 // We filter out most IPC messages when swapped out. However, some are 15 // We filter out most IPC messages when swapped out. However, some are
16 // important (e.g., ACKs) for keeping the browser and renderer state 16 // important (e.g., ACKs) for keeping the browser and renderer state
17 // consistent in case we later return to the same renderer. 17 // consistent in case we later return to the same renderer.
18 switch (msg->type()) { 18 switch (msg->type()) {
19 // Handled by RenderWidget. 19 // Handled by RenderWidget.
20 case InputHostMsg_HandleInputEvent_ACK::ID: 20 case InputHostMsg_HandleInputEvent_ACK::ID:
21 case ViewHostMsg_PaintAtSize_ACK::ID: 21 case ViewHostMsg_PaintAtSize_ACK::ID:
22 case ViewHostMsg_UpdateRect::ID: 22 case ViewHostMsg_UpdateRect::ID:
23 // Allow targeted navigations while swapped out. 23 // Allow targeted navigations while swapped out.
24 case ViewHostMsg_OpenURL::ID: 24 case ViewHostMsg_OpenURL::ID:
25 case ViewHostMsg_Focus::ID: 25 case ViewHostMsg_Focus::ID:
26 // Handled by RenderView. 26 // Handled by RenderView.
27 case ViewHostMsg_RenderViewGone::ID: 27 case ViewHostMsg_RenderProcessGone::ID:
28 case ViewHostMsg_ShouldClose_ACK::ID: 28 case ViewHostMsg_ShouldClose_ACK::ID:
29 case ViewHostMsg_SwapOut_ACK::ID: 29 case ViewHostMsg_SwapOut_ACK::ID:
30 case ViewHostMsg_ClosePage_ACK::ID: 30 case ViewHostMsg_ClosePage_ACK::ID:
31 case ViewHostMsg_DomOperationResponse::ID: 31 case ViewHostMsg_DomOperationResponse::ID:
32 case ViewHostMsg_SwapCompositorFrame::ID: 32 case ViewHostMsg_SwapCompositorFrame::ID:
33 case ViewHostMsg_UpdateIsDelayed::ID: 33 case ViewHostMsg_UpdateIsDelayed::ID:
34 case ViewHostMsg_DidActivateAcceleratedCompositing::ID: 34 case ViewHostMsg_DidActivateAcceleratedCompositing::ID:
35 // Allow cross-process JavaScript calls. 35 // Allow cross-process JavaScript calls.
36 case ViewHostMsg_RouteCloseEvent::ID: 36 case ViewHostMsg_RouteCloseEvent::ID:
37 case ViewHostMsg_RouteMessageEvent::ID: 37 case ViewHostMsg_RouteMessageEvent::ID:
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 default: 85 default:
86 break; 86 break;
87 } 87 }
88 88
89 // Check with the embedder as well. 89 // Check with the embedder as well.
90 ContentClient* client = GetContentClient(); 90 ContentClient* client = GetContentClient();
91 return client->CanHandleWhileSwappedOut(msg); 91 return client->CanHandleWhileSwappedOut(msg);
92 } 92 }
93 93
94 } // namespace content 94 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl_unittest.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698