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

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

Issue 1777503003: More strict restrictions for content -> content/shell dependencies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unnecessary namespace-qualification. Created 4 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
« no previous file with comments | « content/common/DEPS ('k') | content/content_shell.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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"
13 12
14 namespace content { 13 namespace content {
15 14
16 bool SwappedOutMessages::CanSendWhileSwappedOut(const IPC::Message* msg) { 15 bool SwappedOutMessages::CanSendWhileSwappedOut(const IPC::Message* msg) {
17 // We filter out most IPC messages when swapped out. However, some are 16 // We filter out most IPC messages when swapped out. However, some are
18 // important (e.g., ACKs) for keeping the browser and renderer state 17 // important (e.g., ACKs) for keeping the browser and renderer state
19 // consistent in case we later return to the same renderer. 18 // consistent in case we later return to the same renderer.
20 switch (msg->type()) { 19 switch (msg->type()) {
21 // Handled by RenderWidgetHost. 20 // Handled by RenderWidgetHost.
22 case InputHostMsg_HandleInputEvent_ACK::ID: 21 case InputHostMsg_HandleInputEvent_ACK::ID:
(...skipping 18 matching lines...) Expand all
41 case FrameHostMsg_Detach::ID: 40 case FrameHostMsg_Detach::ID:
42 case FrameHostMsg_DomOperationResponse::ID: 41 case FrameHostMsg_DomOperationResponse::ID:
43 // Input events propagate from parent to child. 42 // Input events propagate from parent to child.
44 case FrameHostMsg_ForwardInputEvent::ID: 43 case FrameHostMsg_ForwardInputEvent::ID:
45 case FrameHostMsg_InitializeChildFrame::ID: 44 case FrameHostMsg_InitializeChildFrame::ID:
46 // The browser should always have an accurate mirror of the renderer's 45 // The browser should always have an accurate mirror of the renderer's
47 // notion of the current page id. 46 // notion of the current page id.
48 case FrameHostMsg_DidAssignPageId::ID: 47 case FrameHostMsg_DidAssignPageId::ID:
49 // A swapped-out frame's opener might be updated with window.open. 48 // A swapped-out frame's opener might be updated with window.open.
50 case FrameHostMsg_DidChangeOpener::ID: 49 case FrameHostMsg_DidChangeOpener::ID:
51 // Used in layout tests; handled in BlinkTestController. 50 // For handling pop-ups from cross-site frames.
52 case ShellViewHostMsg_PrintMessage::ID:
53 case ShellViewHostMsg_LayoutDumpFlagsChanged::ID:
54 case ViewHostMsg_CreateWidget::ID: 51 case ViewHostMsg_CreateWidget::ID:
55 return true; 52 return true;
56 default: 53 default:
57 break; 54 break;
58 } 55 }
59 56
60 // Check with the embedder as well. 57 // Check with the embedder as well.
61 ContentClient* client = GetContentClient(); 58 ContentClient* client = GetContentClient();
62 return client->CanSendWhileSwappedOut(msg); 59 return client->CanSendWhileSwappedOut(msg);
63 } 60 }
(...skipping 29 matching lines...) Expand all
93 case AccessibilityHostMsg_Events::ID: 90 case AccessibilityHostMsg_Events::ID:
94 return true; 91 return true;
95 default: 92 default:
96 break; 93 break;
97 } 94 }
98 95
99 return false; 96 return false;
100 } 97 }
101 98
102 } // namespace content 99 } // namespace content
OLDNEW
« no previous file with comments | « content/common/DEPS ('k') | content/content_shell.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698