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

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

Issue 2655463006: PlzNavigate: Enforce 'frame-src' CSP on the browser. (Closed)
Patch Set: Fix tests. Created 3 years, 10 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/csp_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/frame_message_enums.h" 25 #include "content/common/frame_message_enums.h"
26 #include "content/common/frame_owner_properties.h" 26 #include "content/common/frame_owner_properties.h"
27 #include "content/common/frame_replication_state.h" 27 #include "content/common/frame_replication_state.h"
28 #include "content/common/navigation_gesture.h" 28 #include "content/common/navigation_gesture.h"
29 #include "content/common/navigation_params.h" 29 #include "content/common/navigation_params.h"
30 #include "content/common/savable_subframe.h" 30 #include "content/common/savable_subframe.h"
31 #include "content/public/common/color_suggestion.h" 31 #include "content/public/common/color_suggestion.h"
32 #include "content/public/common/common_param_traits.h" 32 #include "content/public/common/common_param_traits.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 IPC_STRUCT_TRAITS_MEMBER(allow_download) 335 IPC_STRUCT_TRAITS_MEMBER(allow_download)
336 IPC_STRUCT_TRAITS_MEMBER(should_replace_current_entry) 336 IPC_STRUCT_TRAITS_MEMBER(should_replace_current_entry)
337 IPC_STRUCT_TRAITS_MEMBER(ui_timestamp) 337 IPC_STRUCT_TRAITS_MEMBER(ui_timestamp)
338 IPC_STRUCT_TRAITS_MEMBER(report_type) 338 IPC_STRUCT_TRAITS_MEMBER(report_type)
339 IPC_STRUCT_TRAITS_MEMBER(base_url_for_data_url) 339 IPC_STRUCT_TRAITS_MEMBER(base_url_for_data_url)
340 IPC_STRUCT_TRAITS_MEMBER(history_url_for_data_url) 340 IPC_STRUCT_TRAITS_MEMBER(history_url_for_data_url)
341 IPC_STRUCT_TRAITS_MEMBER(previews_state) 341 IPC_STRUCT_TRAITS_MEMBER(previews_state)
342 IPC_STRUCT_TRAITS_MEMBER(navigation_start) 342 IPC_STRUCT_TRAITS_MEMBER(navigation_start)
343 IPC_STRUCT_TRAITS_MEMBER(method) 343 IPC_STRUCT_TRAITS_MEMBER(method)
344 IPC_STRUCT_TRAITS_MEMBER(post_data) 344 IPC_STRUCT_TRAITS_MEMBER(post_data)
345 IPC_STRUCT_TRAITS_MEMBER(should_bypass_main_world_CSP)
345 IPC_STRUCT_TRAITS_END() 346 IPC_STRUCT_TRAITS_END()
346 347
347 IPC_STRUCT_TRAITS_BEGIN(content::BeginNavigationParams) 348 IPC_STRUCT_TRAITS_BEGIN(content::BeginNavigationParams)
348 IPC_STRUCT_TRAITS_MEMBER(headers) 349 IPC_STRUCT_TRAITS_MEMBER(headers)
349 IPC_STRUCT_TRAITS_MEMBER(load_flags) 350 IPC_STRUCT_TRAITS_MEMBER(load_flags)
350 IPC_STRUCT_TRAITS_MEMBER(has_user_gesture) 351 IPC_STRUCT_TRAITS_MEMBER(has_user_gesture)
351 IPC_STRUCT_TRAITS_MEMBER(skip_service_worker) 352 IPC_STRUCT_TRAITS_MEMBER(skip_service_worker)
352 IPC_STRUCT_TRAITS_MEMBER(request_context_type) 353 IPC_STRUCT_TRAITS_MEMBER(request_context_type)
353 IPC_STRUCT_TRAITS_MEMBER(mixed_content_context_type) 354 IPC_STRUCT_TRAITS_MEMBER(mixed_content_context_type)
354 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url) 355 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url)
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 IPC_STRUCT_TRAITS_MEMBER(directives) 559 IPC_STRUCT_TRAITS_MEMBER(directives)
559 IPC_STRUCT_TRAITS_MEMBER(report_endpoints) 560 IPC_STRUCT_TRAITS_MEMBER(report_endpoints)
560 IPC_STRUCT_TRAITS_END() 561 IPC_STRUCT_TRAITS_END()
561 562
562 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader) 563 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader)
563 IPC_STRUCT_TRAITS_MEMBER(header_value) 564 IPC_STRUCT_TRAITS_MEMBER(header_value)
564 IPC_STRUCT_TRAITS_MEMBER(type) 565 IPC_STRUCT_TRAITS_MEMBER(type)
565 IPC_STRUCT_TRAITS_MEMBER(source) 566 IPC_STRUCT_TRAITS_MEMBER(source)
566 IPC_STRUCT_TRAITS_END() 567 IPC_STRUCT_TRAITS_END()
567 568
569 IPC_STRUCT_TRAITS_BEGIN(content::CSPViolationParams)
570 IPC_STRUCT_TRAITS_MEMBER(directive)
571 IPC_STRUCT_TRAITS_MEMBER(effective_directive)
572 IPC_STRUCT_TRAITS_MEMBER(console_message)
573 IPC_STRUCT_TRAITS_MEMBER(blocked_url)
574 IPC_STRUCT_TRAITS_MEMBER(report_endpoints)
575 IPC_STRUCT_TRAITS_MEMBER(header)
576 IPC_STRUCT_TRAITS_MEMBER(disposition)
577 IPC_STRUCT_TRAITS_END()
578
568 IPC_STRUCT_TRAITS_BEGIN(content::FormFieldData) 579 IPC_STRUCT_TRAITS_BEGIN(content::FormFieldData)
569 IPC_STRUCT_TRAITS_MEMBER(text) 580 IPC_STRUCT_TRAITS_MEMBER(text)
570 IPC_STRUCT_TRAITS_MEMBER(placeholder) 581 IPC_STRUCT_TRAITS_MEMBER(placeholder)
571 IPC_STRUCT_TRAITS_MEMBER(text_input_type) 582 IPC_STRUCT_TRAITS_MEMBER(text_input_type)
572 IPC_STRUCT_TRAITS_END() 583 IPC_STRUCT_TRAITS_END()
573 584
574 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo) 585 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo)
575 IPC_STRUCT_TRAITS_MEMBER(file_path) 586 IPC_STRUCT_TRAITS_MEMBER(file_path)
576 IPC_STRUCT_TRAITS_MEMBER(display_name) 587 IPC_STRUCT_TRAITS_MEMBER(display_name)
577 IPC_STRUCT_TRAITS_MEMBER(file_system_url) 588 IPC_STRUCT_TRAITS_MEMBER(file_system_url)
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 900
890 // PlzNavigate 901 // PlzNavigate
891 // Tells the renderer that a navigation failed with the error code |error_code| 902 // Tells the renderer that a navigation failed with the error code |error_code|
892 // and that the renderer should display an appropriate error page. 903 // and that the renderer should display an appropriate error page.
893 IPC_MESSAGE_ROUTED4(FrameMsg_FailedNavigation, 904 IPC_MESSAGE_ROUTED4(FrameMsg_FailedNavigation,
894 content::CommonNavigationParams, /* common_params */ 905 content::CommonNavigationParams, /* common_params */
895 content::RequestNavigationParams, /* request_params */ 906 content::RequestNavigationParams, /* request_params */
896 bool, /* stale_copy_in_cache */ 907 bool, /* stale_copy_in_cache */
897 int /* error_code */) 908 int /* error_code */)
898 909
910 // PlzNavigate
911 // Tells the renderer that a navigation was blocked because a content security
912 // policy was infringed.
913 IPC_MESSAGE_ROUTED1(FrameMsg_ContentSecurityPolicyViolation,
914 content::CSPViolationParams /* violation_params*/)
915
899 // Request to enumerate and return links to all savable resources in the frame 916 // Request to enumerate and return links to all savable resources in the frame
900 // Note: this covers only the immediate frame / doesn't cover subframes. 917 // Note: this covers only the immediate frame / doesn't cover subframes.
901 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks) 918 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks)
902 919
903 // Get html data by serializing the target frame and replacing all resource 920 // Get html data by serializing the target frame and replacing all resource
904 // links with a path to the local copy passed in the message payload. 921 // links with a path to the local copy passed in the message payload.
905 IPC_MESSAGE_ROUTED2(FrameMsg_GetSerializedHtmlWithLocalLinks, 922 IPC_MESSAGE_ROUTED2(FrameMsg_GetSerializedHtmlWithLocalLinks,
906 FrameMsg_GetSerializedHtmlWithLocalLinks_UrlMap, 923 FrameMsg_GetSerializedHtmlWithLocalLinks_UrlMap,
907 FrameMsg_GetSerializedHtmlWithLocalLinks_FrameRoutingIdMap) 924 FrameMsg_GetSerializedHtmlWithLocalLinks_FrameRoutingIdMap)
908 925
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 // nearest find result in the sending frame. 1621 // nearest find result in the sending frame.
1605 IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply, 1622 IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply,
1606 int /* nfr_request_id */, 1623 int /* nfr_request_id */,
1607 float /* distance */) 1624 float /* distance */)
1608 #endif 1625 #endif
1609 1626
1610 // Adding a new message? Stick to the sort order above: first platform 1627 // Adding a new message? Stick to the sort order above: first platform
1611 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then 1628 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then
1612 // platform independent FrameHostMsg, then ifdefs for platform specific 1629 // platform independent FrameHostMsg, then ifdefs for platform specific
1613 // FrameHostMsg. 1630 // FrameHostMsg.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698