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

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

Issue 2655463006: PlzNavigate: Enforce 'frame-src' CSP on the browser. (Closed)
Patch Set: Addressed comments 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/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/message_port.h" 28 #include "content/common/message_port.h"
29 #include "content/common/navigation_gesture.h" 29 #include "content/common/navigation_gesture.h"
30 #include "content/common/navigation_params.h" 30 #include "content/common/navigation_params.h"
31 #include "content/common/savable_subframe.h" 31 #include "content/common/savable_subframe.h"
32 #include "content/public/common/color_suggestion.h" 32 #include "content/public/common/color_suggestion.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)
ncarter (slow) 2017/03/13 18:44:29 I'm wondering if we ought to consider making this
arthursonzogni 2017/03/14 15:38:57 I lack knowledge about isolated world. Okay, there
alexmos 2017/03/17 00:24:27 Our docs say that "content scripts are generally n
arthursonzogni 2017/03/17 11:42:31 TODO and BUG added: https://crbug.com/702540
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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 IPC_STRUCT_TRAITS_MEMBER(report_endpoints) 563 IPC_STRUCT_TRAITS_MEMBER(report_endpoints)
563 IPC_STRUCT_TRAITS_MEMBER(header) 564 IPC_STRUCT_TRAITS_MEMBER(header)
564 IPC_STRUCT_TRAITS_END() 565 IPC_STRUCT_TRAITS_END()
565 566
566 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader) 567 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader)
567 IPC_STRUCT_TRAITS_MEMBER(header_value) 568 IPC_STRUCT_TRAITS_MEMBER(header_value)
568 IPC_STRUCT_TRAITS_MEMBER(type) 569 IPC_STRUCT_TRAITS_MEMBER(type)
569 IPC_STRUCT_TRAITS_MEMBER(source) 570 IPC_STRUCT_TRAITS_MEMBER(source)
570 IPC_STRUCT_TRAITS_END() 571 IPC_STRUCT_TRAITS_END()
571 572
573 IPC_STRUCT_TRAITS_BEGIN(content::CSPViolationParams)
574 IPC_STRUCT_TRAITS_MEMBER(directive)
575 IPC_STRUCT_TRAITS_MEMBER(effective_directive)
576 IPC_STRUCT_TRAITS_MEMBER(console_message)
577 IPC_STRUCT_TRAITS_MEMBER(blocked_url)
578 IPC_STRUCT_TRAITS_MEMBER(report_endpoints)
579 IPC_STRUCT_TRAITS_MEMBER(header)
580 IPC_STRUCT_TRAITS_MEMBER(disposition)
581 IPC_STRUCT_TRAITS_MEMBER(after_redirect)
582 IPC_STRUCT_TRAITS_END()
583
572 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo) 584 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo)
573 IPC_STRUCT_TRAITS_MEMBER(file_path) 585 IPC_STRUCT_TRAITS_MEMBER(file_path)
574 IPC_STRUCT_TRAITS_MEMBER(display_name) 586 IPC_STRUCT_TRAITS_MEMBER(display_name)
575 IPC_STRUCT_TRAITS_MEMBER(file_system_url) 587 IPC_STRUCT_TRAITS_MEMBER(file_system_url)
576 IPC_STRUCT_TRAITS_MEMBER(modification_time) 588 IPC_STRUCT_TRAITS_MEMBER(modification_time)
577 IPC_STRUCT_TRAITS_MEMBER(length) 589 IPC_STRUCT_TRAITS_MEMBER(length)
578 IPC_STRUCT_TRAITS_MEMBER(is_directory) 590 IPC_STRUCT_TRAITS_MEMBER(is_directory)
579 IPC_STRUCT_TRAITS_END() 591 IPC_STRUCT_TRAITS_END()
580 592
581 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams) 593 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams)
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 895
884 // PlzNavigate 896 // PlzNavigate
885 // Tells the renderer that a navigation failed with the error code |error_code| 897 // Tells the renderer that a navigation failed with the error code |error_code|
886 // and that the renderer should display an appropriate error page. 898 // and that the renderer should display an appropriate error page.
887 IPC_MESSAGE_ROUTED4(FrameMsg_FailedNavigation, 899 IPC_MESSAGE_ROUTED4(FrameMsg_FailedNavigation,
888 content::CommonNavigationParams, /* common_params */ 900 content::CommonNavigationParams, /* common_params */
889 content::RequestNavigationParams, /* request_params */ 901 content::RequestNavigationParams, /* request_params */
890 bool, /* stale_copy_in_cache */ 902 bool, /* stale_copy_in_cache */
891 int /* error_code */) 903 int /* error_code */)
892 904
905 // PlzNavigate
906 // Tells the renderer that a navigation was blocked because a content security
907 // policy was violated.
908 IPC_MESSAGE_ROUTED1(FrameMsg_ReportContentSecurityPolicyViolation,
909 content::CSPViolationParams /* violation_params */)
910
893 // Request to enumerate and return links to all savable resources in the frame 911 // Request to enumerate and return links to all savable resources in the frame
894 // Note: this covers only the immediate frame / doesn't cover subframes. 912 // Note: this covers only the immediate frame / doesn't cover subframes.
895 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks) 913 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks)
896 914
897 // Get html data by serializing the target frame and replacing all resource 915 // Get html data by serializing the target frame and replacing all resource
898 // links with a path to the local copy passed in the message payload. 916 // links with a path to the local copy passed in the message payload.
899 IPC_MESSAGE_ROUTED2(FrameMsg_GetSerializedHtmlWithLocalLinks, 917 IPC_MESSAGE_ROUTED2(FrameMsg_GetSerializedHtmlWithLocalLinks,
900 FrameMsg_GetSerializedHtmlWithLocalLinks_UrlMap, 918 FrameMsg_GetSerializedHtmlWithLocalLinks_UrlMap,
901 FrameMsg_GetSerializedHtmlWithLocalLinks_FrameRoutingIdMap) 919 FrameMsg_GetSerializedHtmlWithLocalLinks_FrameRoutingIdMap)
902 920
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 // nearest find result in the sending frame. 1626 // nearest find result in the sending frame.
1609 IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply, 1627 IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply,
1610 int /* nfr_request_id */, 1628 int /* nfr_request_id */,
1611 float /* distance */) 1629 float /* distance */)
1612 #endif 1630 #endif
1613 1631
1614 // Adding a new message? Stick to the sort order above: first platform 1632 // Adding a new message? Stick to the sort order above: first platform
1615 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then 1633 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then
1616 // platform independent FrameHostMsg, then ifdefs for platform specific 1634 // platform independent FrameHostMsg, then ifdefs for platform specific
1617 // FrameHostMsg. 1635 // FrameHostMsg.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698