OLD | NEW |
---|---|
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 #include "content/shell/common/shell_messages.h" | 12 #include "content/shell/common/shell_messages.h" |
jochen (gone - plz use gerrit)
2016/03/08 16:33:18
WAT?
can you please introduce a ContentClient cal
Łukasz Anforowicz
2016/03/08 17:31:06
Hmmm... good point. How could I miss that... :-/
| |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 bool SwappedOutMessages::CanSendWhileSwappedOut(const IPC::Message* msg) { | 16 bool SwappedOutMessages::CanSendWhileSwappedOut(const IPC::Message* msg) { |
17 // We filter out most IPC messages when swapped out. However, some are | 17 // We filter out most IPC messages when swapped out. However, some are |
18 // important (e.g., ACKs) for keeping the browser and renderer state | 18 // important (e.g., ACKs) for keeping the browser and renderer state |
19 // consistent in case we later return to the same renderer. | 19 // consistent in case we later return to the same renderer. |
20 switch (msg->type()) { | 20 switch (msg->type()) { |
21 // Handled by RenderWidgetHost. | 21 // Handled by RenderWidgetHost. |
22 case InputHostMsg_HandleInputEvent_ACK::ID: | 22 case InputHostMsg_HandleInputEvent_ACK::ID: |
(...skipping 21 matching lines...) Expand all Loading... | |
44 case FrameHostMsg_ForwardInputEvent::ID: | 44 case FrameHostMsg_ForwardInputEvent::ID: |
45 case FrameHostMsg_InitializeChildFrame::ID: | 45 case FrameHostMsg_InitializeChildFrame::ID: |
46 // The browser should always have an accurate mirror of the renderer's | 46 // The browser should always have an accurate mirror of the renderer's |
47 // notion of the current page id. | 47 // notion of the current page id. |
48 case FrameHostMsg_DidAssignPageId::ID: | 48 case FrameHostMsg_DidAssignPageId::ID: |
49 // A swapped-out frame's opener might be updated with window.open. | 49 // A swapped-out frame's opener might be updated with window.open. |
50 case FrameHostMsg_DidChangeOpener::ID: | 50 case FrameHostMsg_DidChangeOpener::ID: |
51 // Used in layout tests; handled in BlinkTestController. | 51 // Used in layout tests; handled in BlinkTestController. |
52 case ShellViewHostMsg_PrintMessage::ID: | 52 case ShellViewHostMsg_PrintMessage::ID: |
53 case ShellViewHostMsg_LayoutDumpFlagsChanged::ID: | 53 case ShellViewHostMsg_LayoutDumpFlagsChanged::ID: |
54 case ShellViewHostMsg_TestFinishedInSecondaryRenderer::ID: | |
54 return true; | 55 return true; |
55 default: | 56 default: |
56 break; | 57 break; |
57 } | 58 } |
58 | 59 |
59 // Check with the embedder as well. | 60 // Check with the embedder as well. |
60 ContentClient* client = GetContentClient(); | 61 ContentClient* client = GetContentClient(); |
61 return client->CanSendWhileSwappedOut(msg); | 62 return client->CanSendWhileSwappedOut(msg); |
62 } | 63 } |
63 | 64 |
(...skipping 28 matching lines...) Expand all Loading... | |
92 case AccessibilityHostMsg_Events::ID: | 93 case AccessibilityHostMsg_Events::ID: |
93 return true; | 94 return true; |
94 default: | 95 default: |
95 break; | 96 break; |
96 } | 97 } |
97 | 98 |
98 return false; | 99 return false; |
99 } | 100 } |
100 | 101 |
101 } // namespace content | 102 } // namespace content |
OLD | NEW |