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

Side by Side Diff: content/common/frame_messages.h

Issue 2655463006: PlzNavigate: Enforce 'frame-src' CSP on the browser. (Closed)
Patch Set: Rebase. Created 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // IPC messages for interacting with frames. 5 // IPC messages for interacting with frames.
6 // Multiply-included message file, hence no include guard. 6 // Multiply-included message file, hence no include guard.
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <map> 11 #include <map>
12 #include <set> 12 #include <set>
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "cc/surfaces/surface_id.h" 17 #include "cc/surfaces/surface_id.h"
18 #include "cc/surfaces/surface_info.h" 18 #include "cc/surfaces/surface_info.h"
19 #include "cc/surfaces/surface_sequence.h" 19 #include "cc/surfaces/surface_sequence.h"
20 #include "content/common/content_export.h" 20 #include "content/common/content_export.h"
21 #include "content/common/content_param_traits.h" 21 #include "content/common/content_param_traits.h"
22 #include "content/common/content_security_policy/content_security_policy.h" 22 #include "content/common/content_security_policy/csp_context.h"
23 #include "content/common/content_security_policy_header.h" 23 #include "content/common/content_security_policy_header.h"
24 #include "content/common/download/mhtml_save_status.h" 24 #include "content/common/download/mhtml_save_status.h"
25 #include "content/common/features.h" 25 #include "content/common/features.h"
26 #include "content/common/frame_message_enums.h" 26 #include "content/common/frame_message_enums.h"
27 #include "content/common/frame_owner_properties.h" 27 #include "content/common/frame_owner_properties.h"
28 #include "content/common/frame_replication_state.h" 28 #include "content/common/frame_replication_state.h"
29 #include "content/common/message_port.h" 29 #include "content/common/message_port.h"
30 #include "content/common/navigation_gesture.h" 30 #include "content/common/navigation_gesture.h"
31 #include "content/common/navigation_params.h" 31 #include "content/common/navigation_params.h"
32 #include "content/common/savable_subframe.h" 32 #include "content/common/savable_subframe.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 IPC_ENUM_TRAITS(blink::WebSandboxFlags) // Bitmask. 106 IPC_ENUM_TRAITS(blink::WebSandboxFlags) // Bitmask.
107 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTreeScopeType, 107 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTreeScopeType,
108 blink::WebTreeScopeType::Last) 108 blink::WebTreeScopeType::Last)
109 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST) 109 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST)
110 IPC_ENUM_TRAITS_MAX_VALUE(content::FileChooserParams::Mode, 110 IPC_ENUM_TRAITS_MAX_VALUE(content::FileChooserParams::Mode,
111 content::FileChooserParams::Save) 111 content::FileChooserParams::Save)
112 IPC_ENUM_TRAITS_MAX_VALUE(content::CSPDirective::Name, 112 IPC_ENUM_TRAITS_MAX_VALUE(content::CSPDirective::Name,
113 content::CSPDirective::NameLast) 113 content::CSPDirective::NameLast)
114 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebFeaturePolicyFeature, 114 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebFeaturePolicyFeature,
115 blink::WebFeaturePolicyFeature::LAST_FEATURE) 115 blink::WebFeaturePolicyFeature::LAST_FEATURE)
116 IPC_ENUM_TRAITS_MAX_VALUE(content::CSPDisposition,
117 content::CSPDisposition::LAST)
116 118
117 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions) 119 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions)
118 IPC_STRUCT_TRAITS_MEMBER(forward) 120 IPC_STRUCT_TRAITS_MEMBER(forward)
119 IPC_STRUCT_TRAITS_MEMBER(matchCase) 121 IPC_STRUCT_TRAITS_MEMBER(matchCase)
120 IPC_STRUCT_TRAITS_MEMBER(findNext) 122 IPC_STRUCT_TRAITS_MEMBER(findNext)
121 IPC_STRUCT_TRAITS_MEMBER(force) 123 IPC_STRUCT_TRAITS_MEMBER(force)
122 IPC_STRUCT_TRAITS_END() 124 IPC_STRUCT_TRAITS_END()
123 125
124 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion) 126 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion)
125 IPC_STRUCT_TRAITS_MEMBER(color) 127 IPC_STRUCT_TRAITS_MEMBER(color)
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 IPC_STRUCT_TRAITS_MEMBER(should_replace_current_entry) 350 IPC_STRUCT_TRAITS_MEMBER(should_replace_current_entry)
349 IPC_STRUCT_TRAITS_MEMBER(ui_timestamp) 351 IPC_STRUCT_TRAITS_MEMBER(ui_timestamp)
350 IPC_STRUCT_TRAITS_MEMBER(report_type) 352 IPC_STRUCT_TRAITS_MEMBER(report_type)
351 IPC_STRUCT_TRAITS_MEMBER(base_url_for_data_url) 353 IPC_STRUCT_TRAITS_MEMBER(base_url_for_data_url)
352 IPC_STRUCT_TRAITS_MEMBER(history_url_for_data_url) 354 IPC_STRUCT_TRAITS_MEMBER(history_url_for_data_url)
353 IPC_STRUCT_TRAITS_MEMBER(previews_state) 355 IPC_STRUCT_TRAITS_MEMBER(previews_state)
354 IPC_STRUCT_TRAITS_MEMBER(navigation_start) 356 IPC_STRUCT_TRAITS_MEMBER(navigation_start)
355 IPC_STRUCT_TRAITS_MEMBER(method) 357 IPC_STRUCT_TRAITS_MEMBER(method)
356 IPC_STRUCT_TRAITS_MEMBER(post_data) 358 IPC_STRUCT_TRAITS_MEMBER(post_data)
357 IPC_STRUCT_TRAITS_MEMBER(source_location) 359 IPC_STRUCT_TRAITS_MEMBER(source_location)
360 IPC_STRUCT_TRAITS_MEMBER(should_check_main_world_csp)
358 IPC_STRUCT_TRAITS_END() 361 IPC_STRUCT_TRAITS_END()
359 362
360 IPC_STRUCT_TRAITS_BEGIN(content::BeginNavigationParams) 363 IPC_STRUCT_TRAITS_BEGIN(content::BeginNavigationParams)
361 IPC_STRUCT_TRAITS_MEMBER(headers) 364 IPC_STRUCT_TRAITS_MEMBER(headers)
362 IPC_STRUCT_TRAITS_MEMBER(load_flags) 365 IPC_STRUCT_TRAITS_MEMBER(load_flags)
363 IPC_STRUCT_TRAITS_MEMBER(has_user_gesture) 366 IPC_STRUCT_TRAITS_MEMBER(has_user_gesture)
364 IPC_STRUCT_TRAITS_MEMBER(skip_service_worker) 367 IPC_STRUCT_TRAITS_MEMBER(skip_service_worker)
365 IPC_STRUCT_TRAITS_MEMBER(request_context_type) 368 IPC_STRUCT_TRAITS_MEMBER(request_context_type)
366 IPC_STRUCT_TRAITS_MEMBER(mixed_content_context_type) 369 IPC_STRUCT_TRAITS_MEMBER(mixed_content_context_type)
367 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url) 370 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url)
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 IPC_STRUCT_TRAITS_MEMBER(report_endpoints) 575 IPC_STRUCT_TRAITS_MEMBER(report_endpoints)
573 IPC_STRUCT_TRAITS_MEMBER(header) 576 IPC_STRUCT_TRAITS_MEMBER(header)
574 IPC_STRUCT_TRAITS_END() 577 IPC_STRUCT_TRAITS_END()
575 578
576 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader) 579 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader)
577 IPC_STRUCT_TRAITS_MEMBER(header_value) 580 IPC_STRUCT_TRAITS_MEMBER(header_value)
578 IPC_STRUCT_TRAITS_MEMBER(type) 581 IPC_STRUCT_TRAITS_MEMBER(type)
579 IPC_STRUCT_TRAITS_MEMBER(source) 582 IPC_STRUCT_TRAITS_MEMBER(source)
580 IPC_STRUCT_TRAITS_END() 583 IPC_STRUCT_TRAITS_END()
581 584
585 IPC_STRUCT_TRAITS_BEGIN(content::CSPViolationParams)
586 IPC_STRUCT_TRAITS_MEMBER(directive)
587 IPC_STRUCT_TRAITS_MEMBER(effective_directive)
588 IPC_STRUCT_TRAITS_MEMBER(console_message)
589 IPC_STRUCT_TRAITS_MEMBER(blocked_url)
590 IPC_STRUCT_TRAITS_MEMBER(report_endpoints)
591 IPC_STRUCT_TRAITS_MEMBER(header)
592 IPC_STRUCT_TRAITS_MEMBER(disposition)
593 IPC_STRUCT_TRAITS_MEMBER(after_redirect)
594 IPC_STRUCT_TRAITS_END()
595
582 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo) 596 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo)
583 IPC_STRUCT_TRAITS_MEMBER(file_path) 597 IPC_STRUCT_TRAITS_MEMBER(file_path)
584 IPC_STRUCT_TRAITS_MEMBER(display_name) 598 IPC_STRUCT_TRAITS_MEMBER(display_name)
585 IPC_STRUCT_TRAITS_MEMBER(file_system_url) 599 IPC_STRUCT_TRAITS_MEMBER(file_system_url)
586 IPC_STRUCT_TRAITS_MEMBER(modification_time) 600 IPC_STRUCT_TRAITS_MEMBER(modification_time)
587 IPC_STRUCT_TRAITS_MEMBER(length) 601 IPC_STRUCT_TRAITS_MEMBER(length)
588 IPC_STRUCT_TRAITS_MEMBER(is_directory) 602 IPC_STRUCT_TRAITS_MEMBER(is_directory)
589 IPC_STRUCT_TRAITS_END() 603 IPC_STRUCT_TRAITS_END()
590 604
591 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams) 605 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams)
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 906
893 // PlzNavigate 907 // PlzNavigate
894 // Tells the renderer that a navigation failed with the error code |error_code| 908 // Tells the renderer that a navigation failed with the error code |error_code|
895 // and that the renderer should display an appropriate error page. 909 // and that the renderer should display an appropriate error page.
896 IPC_MESSAGE_ROUTED4(FrameMsg_FailedNavigation, 910 IPC_MESSAGE_ROUTED4(FrameMsg_FailedNavigation,
897 content::CommonNavigationParams, /* common_params */ 911 content::CommonNavigationParams, /* common_params */
898 content::RequestNavigationParams, /* request_params */ 912 content::RequestNavigationParams, /* request_params */
899 bool, /* stale_copy_in_cache */ 913 bool, /* stale_copy_in_cache */
900 int /* error_code */) 914 int /* error_code */)
901 915
916 // PlzNavigate
917 // Tells the renderer that a navigation was blocked because a content security
918 // policy was violated.
919 IPC_MESSAGE_ROUTED1(FrameMsg_ReportContentSecurityPolicyViolation,
920 content::CSPViolationParams /* violation_params */)
921
902 // Request to enumerate and return links to all savable resources in the frame 922 // Request to enumerate and return links to all savable resources in the frame
903 // Note: this covers only the immediate frame / doesn't cover subframes. 923 // Note: this covers only the immediate frame / doesn't cover subframes.
904 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks) 924 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks)
905 925
906 // Get html data by serializing the target frame and replacing all resource 926 // Get html data by serializing the target frame and replacing all resource
907 // links with a path to the local copy passed in the message payload. 927 // links with a path to the local copy passed in the message payload.
908 IPC_MESSAGE_ROUTED2(FrameMsg_GetSerializedHtmlWithLocalLinks, 928 IPC_MESSAGE_ROUTED2(FrameMsg_GetSerializedHtmlWithLocalLinks,
909 FrameMsg_GetSerializedHtmlWithLocalLinks_UrlMap, 929 FrameMsg_GetSerializedHtmlWithLocalLinks_UrlMap,
910 FrameMsg_GetSerializedHtmlWithLocalLinks_FrameRoutingIdMap) 930 FrameMsg_GetSerializedHtmlWithLocalLinks_FrameRoutingIdMap)
911 931
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
1619 int /* nfr_request_id */, 1639 int /* nfr_request_id */,
1620 float /* distance */) 1640 float /* distance */)
1621 1641
1622 IPC_MESSAGE_ROUTED0(FrameHostMsg_NavigationHandledByEmbedder) 1642 IPC_MESSAGE_ROUTED0(FrameHostMsg_NavigationHandledByEmbedder)
1623 #endif 1643 #endif
1624 1644
1625 // Adding a new message? Stick to the sort order above: first platform 1645 // Adding a new message? Stick to the sort order above: first platform
1626 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then 1646 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then
1627 // platform independent FrameHostMsg, then ifdefs for platform specific 1647 // platform independent FrameHostMsg, then ifdefs for platform specific
1628 // FrameHostMsg. 1648 // FrameHostMsg.
OLDNEW
« no previous file with comments | « content/common/content_security_policy/csp_source_list.cc ('k') | content/common/navigation_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698