This source file includes following definitions.
- CanSendWhileSwappedOut
- CanHandleWhileSwappedOut
#include "content/common/swapped_out_messages.h"
#include "content/common/accessibility_messages.h"
#include "content/common/frame_messages.h"
#include "content/common/input_messages.h"
#include "content/common/view_messages.h"
#include "content/public/common/content_client.h"
namespace content {
bool SwappedOutMessages::CanSendWhileSwappedOut(const IPC::Message* msg) {
switch (msg->type()) {
case InputHostMsg_HandleInputEvent_ACK::ID:
case ViewHostMsg_UpdateRect::ID:
case FrameHostMsg_OpenURL::ID:
case ViewHostMsg_Focus::ID:
case ViewHostMsg_RenderProcessGone::ID:
case ViewHostMsg_ClosePage_ACK::ID:
case ViewHostMsg_SwapCompositorFrame::ID:
case ViewHostMsg_UpdateIsDelayed::ID:
case ViewHostMsg_DidActivateAcceleratedCompositing::ID:
case ViewHostMsg_DocumentDetached::ID:
case ViewHostMsg_RouteCloseEvent::ID:
case ViewHostMsg_RouteMessageEvent::ID:
case FrameHostMsg_BeforeUnload_ACK::ID:
case FrameHostMsg_SwapOut_ACK::ID:
case FrameHostMsg_Detach::ID:
case FrameHostMsg_DomOperationResponse::ID:
case FrameHostMsg_CompositorFrameSwappedACK::ID:
case FrameHostMsg_BuffersSwappedACK::ID:
case FrameHostMsg_ReclaimCompositorResources::ID:
case FrameHostMsg_ForwardInputEvent::ID:
case FrameHostMsg_InitializeChildFrame::ID:
return true;
default:
break;
}
ContentClient* client = GetContentClient();
return client->CanSendWhileSwappedOut(msg);
}
bool SwappedOutMessages::CanHandleWhileSwappedOut(
const IPC::Message& msg) {
if (CanSendWhileSwappedOut(&msg))
return true;
switch (msg.type()) {
case ViewHostMsg_ShowView::ID:
case ViewHostMsg_ShowWidget::ID:
case ViewHostMsg_ShowFullscreenWidget::ID:
case ViewHostMsg_RenderViewReady::ID:
case ViewHostMsg_UpdateState::ID:
case ViewHostMsg_UpdateTargetURL::ID:
case ViewHostMsg_Close::ID:
case ViewHostMsg_RequestMove::ID:
case AccessibilityHostMsg_Events::ID:
#if defined(USE_X11)
case ViewHostMsg_DestroyPluginContainer::ID:
#endif
return true;
default:
break;
}
ContentClient* client = GetContentClient();
return client->CanHandleWhileSwappedOut(msg);
}
}