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

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

Issue 9706047: Allow targeted links to work on tabs that have swapped out processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add TODO Created 8 years, 9 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/view_messages.h" 8 #include "content/common/view_messages.h"
9 #include "content/public/common/content_client.h" 9 #include "content/public/common/content_client.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 bool SwappedOutMessages::CanSendWhileSwappedOut(const IPC::Message* msg) { 13 bool SwappedOutMessages::CanSendWhileSwappedOut(const IPC::Message* msg) {
14 // We filter out most IPC messages when swapped out. However, some are 14 // We filter out most IPC messages when swapped out. However, some are
15 // important (e.g., ACKs) for keeping the browser and renderer state 15 // important (e.g., ACKs) for keeping the browser and renderer state
16 // consistent in case we later return to the same renderer. 16 // consistent in case we later return to the same renderer.
17 switch (msg->type()) { 17 switch (msg->type()) {
18 // Handled by RenderWidget. 18 // Handled by RenderWidget.
19 case ViewHostMsg_HandleInputEvent_ACK::ID: 19 case ViewHostMsg_HandleInputEvent_ACK::ID:
20 case ViewHostMsg_PaintAtSize_ACK::ID: 20 case ViewHostMsg_PaintAtSize_ACK::ID:
21 case ViewHostMsg_UpdateRect::ID: 21 case ViewHostMsg_UpdateRect::ID:
22 // Allow targeted navigations while swapped out.
23 case ViewHostMsg_OpenURL::ID:
24 case ViewHostMsg_Focus::ID:
22 // Handled by RenderView. 25 // Handled by RenderView.
23 case ViewHostMsg_RenderViewGone::ID: 26 case ViewHostMsg_RenderViewGone::ID:
24 case ViewHostMsg_ShouldClose_ACK::ID: 27 case ViewHostMsg_ShouldClose_ACK::ID:
25 case ViewHostMsg_SwapOut_ACK::ID: 28 case ViewHostMsg_SwapOut_ACK::ID:
26 case ViewHostMsg_ClosePage_ACK::ID: 29 case ViewHostMsg_ClosePage_ACK::ID:
27 case ViewHostMsg_DomOperationResponse::ID: 30 case ViewHostMsg_DomOperationResponse::ID:
28 return true; 31 return true;
29 default: 32 default:
30 break; 33 break;
31 } 34 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 default: 76 default:
74 break; 77 break;
75 } 78 }
76 79
77 // Check with the embedder as well. 80 // Check with the embedder as well.
78 ContentClient* client = GetContentClient(); 81 ContentClient* client = GetContentClient();
79 return client->CanHandleWhileSwappedOut(msg); 82 return client->CanHandleWhileSwappedOut(msg);
80 } 83 }
81 84
82 } // namespace content 85 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_manager_browsertest.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698