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

Unified Diff: content/common/swapped_out_messages.cc

Issue 8760024: Cross-process postMessage (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: content/common/swapped_out_messages.cc
diff --git a/content/common/swapped_out_messages.cc b/content/common/swapped_out_messages.cc
index 3189d19f7f7cc5aaedbbc20b856610c33aabc249..ff1043d7186892b6f5656884665ff3709ff4d23c 100644
--- a/content/common/swapped_out_messages.cc
+++ b/content/common/swapped_out_messages.cc
@@ -9,11 +9,12 @@
namespace content {
-bool SwappedOutMessages::CanSendWhileSwappedOut(const IPC::Message* msg) {
- // We filter out most IPC messages when swapped out. However, some are
- // important (e.g., ACKs) for keeping the browser and renderer state
- // consistent in case we later return to the same renderer.
- switch (msg->type()) {
+bool SwappedOutMessages::CanHandleWhileSwappedOut(
+ const IPC::Message& msg) {
+ // We drop most other messages that arrive from a swapped out renderer.
+ // However, some are important (e.g., ACKs) for keeping the browser and
+ // renderer state consistent in case we later return to the renderer.
+ switch (msg.type()) {
// Handled by RenderWidget.
case ViewHostMsg_HandleInputEvent_ACK::ID:
case ViewHostMsg_PaintAtSize_ACK::ID:
@@ -23,27 +24,6 @@ bool SwappedOutMessages::CanSendWhileSwappedOut(const IPC::Message* msg) {
case ViewHostMsg_ShouldClose_ACK::ID:
case ViewHostMsg_SwapOut_ACK::ID:
case ViewHostMsg_ClosePage_ACK::ID:
- return true;
- default:
- break;
- }
-
- // Check with the embedder as well.
- ContentClient* client = GetContentClient();
- return client->CanSendWhileSwappedOut(msg);
-}
-
-bool SwappedOutMessages::CanHandleWhileSwappedOut(
- const IPC::Message& msg) {
- // Any message the renderer is allowed to send while swapped out should
- // be handled by the browser.
- if (CanSendWhileSwappedOut(&msg))
- return true;
-
- // We drop most other messages that arrive from a swapped out renderer.
- // However, some are important (e.g., ACKs) for keeping the browser and
- // renderer state consistent in case we later return to the renderer.
- switch (msg.type()) {
// Sends an ACK.
case ViewHostMsg_ShowView::ID:
// Sends an ACK.
@@ -70,6 +50,7 @@ bool SwappedOutMessages::CanHandleWhileSwappedOut(
// Synchronous message when leaving a page with plugin.
case ViewHostMsg_DestroyPluginContainer::ID:
#endif
+ case ViewHostMsg_SendPostMessage::ID:
return true;
default:
break;

Powered by Google App Engine
This is Rietveld 408576698