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

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

Issue 2727633005: PlzNavigate: Enforce frame-src CSP on the browser. (Closed)
Patch Set: Addressed Alex's comments + trying to fix subframe swap issue 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 IPC_STRUCT_TRAITS_MEMBER(allow_download) 338 IPC_STRUCT_TRAITS_MEMBER(allow_download)
339 IPC_STRUCT_TRAITS_MEMBER(should_replace_current_entry) 339 IPC_STRUCT_TRAITS_MEMBER(should_replace_current_entry)
340 IPC_STRUCT_TRAITS_MEMBER(ui_timestamp) 340 IPC_STRUCT_TRAITS_MEMBER(ui_timestamp)
341 IPC_STRUCT_TRAITS_MEMBER(report_type) 341 IPC_STRUCT_TRAITS_MEMBER(report_type)
342 IPC_STRUCT_TRAITS_MEMBER(base_url_for_data_url) 342 IPC_STRUCT_TRAITS_MEMBER(base_url_for_data_url)
343 IPC_STRUCT_TRAITS_MEMBER(history_url_for_data_url) 343 IPC_STRUCT_TRAITS_MEMBER(history_url_for_data_url)
344 IPC_STRUCT_TRAITS_MEMBER(previews_state) 344 IPC_STRUCT_TRAITS_MEMBER(previews_state)
345 IPC_STRUCT_TRAITS_MEMBER(navigation_start) 345 IPC_STRUCT_TRAITS_MEMBER(navigation_start)
346 IPC_STRUCT_TRAITS_MEMBER(method) 346 IPC_STRUCT_TRAITS_MEMBER(method)
347 IPC_STRUCT_TRAITS_MEMBER(post_data) 347 IPC_STRUCT_TRAITS_MEMBER(post_data)
348 IPC_STRUCT_TRAITS_MEMBER(should_bypass_main_world_csp)
348 IPC_STRUCT_TRAITS_END() 349 IPC_STRUCT_TRAITS_END()
349 350
350 IPC_STRUCT_TRAITS_BEGIN(content::BeginNavigationParams) 351 IPC_STRUCT_TRAITS_BEGIN(content::BeginNavigationParams)
351 IPC_STRUCT_TRAITS_MEMBER(headers) 352 IPC_STRUCT_TRAITS_MEMBER(headers)
352 IPC_STRUCT_TRAITS_MEMBER(load_flags) 353 IPC_STRUCT_TRAITS_MEMBER(load_flags)
353 IPC_STRUCT_TRAITS_MEMBER(has_user_gesture) 354 IPC_STRUCT_TRAITS_MEMBER(has_user_gesture)
354 IPC_STRUCT_TRAITS_MEMBER(skip_service_worker) 355 IPC_STRUCT_TRAITS_MEMBER(skip_service_worker)
355 IPC_STRUCT_TRAITS_MEMBER(request_context_type) 356 IPC_STRUCT_TRAITS_MEMBER(request_context_type)
356 IPC_STRUCT_TRAITS_MEMBER(mixed_content_context_type) 357 IPC_STRUCT_TRAITS_MEMBER(mixed_content_context_type)
357 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url) 358 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url)
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 IPC_STRUCT_TRAITS_MEMBER(report_endpoints) 566 IPC_STRUCT_TRAITS_MEMBER(report_endpoints)
566 IPC_STRUCT_TRAITS_MEMBER(header) 567 IPC_STRUCT_TRAITS_MEMBER(header)
567 IPC_STRUCT_TRAITS_END() 568 IPC_STRUCT_TRAITS_END()
568 569
569 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader) 570 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader)
570 IPC_STRUCT_TRAITS_MEMBER(header_value) 571 IPC_STRUCT_TRAITS_MEMBER(header_value)
571 IPC_STRUCT_TRAITS_MEMBER(type) 572 IPC_STRUCT_TRAITS_MEMBER(type)
572 IPC_STRUCT_TRAITS_MEMBER(source) 573 IPC_STRUCT_TRAITS_MEMBER(source)
573 IPC_STRUCT_TRAITS_END() 574 IPC_STRUCT_TRAITS_END()
574 575
576 IPC_STRUCT_TRAITS_BEGIN(content::CSPViolationParams)
577 IPC_STRUCT_TRAITS_MEMBER(directive)
578 IPC_STRUCT_TRAITS_MEMBER(effective_directive)
579 IPC_STRUCT_TRAITS_MEMBER(console_message)
580 IPC_STRUCT_TRAITS_MEMBER(blocked_url)
581 IPC_STRUCT_TRAITS_MEMBER(report_endpoints)
582 IPC_STRUCT_TRAITS_MEMBER(header)
583 IPC_STRUCT_TRAITS_MEMBER(disposition)
584 IPC_STRUCT_TRAITS_MEMBER(after_redirect)
585 IPC_STRUCT_TRAITS_END()
586
575 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo) 587 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo)
576 IPC_STRUCT_TRAITS_MEMBER(file_path) 588 IPC_STRUCT_TRAITS_MEMBER(file_path)
577 IPC_STRUCT_TRAITS_MEMBER(display_name) 589 IPC_STRUCT_TRAITS_MEMBER(display_name)
578 IPC_STRUCT_TRAITS_MEMBER(file_system_url) 590 IPC_STRUCT_TRAITS_MEMBER(file_system_url)
579 IPC_STRUCT_TRAITS_MEMBER(modification_time) 591 IPC_STRUCT_TRAITS_MEMBER(modification_time)
580 IPC_STRUCT_TRAITS_MEMBER(length) 592 IPC_STRUCT_TRAITS_MEMBER(length)
581 IPC_STRUCT_TRAITS_MEMBER(is_directory) 593 IPC_STRUCT_TRAITS_MEMBER(is_directory)
582 IPC_STRUCT_TRAITS_END() 594 IPC_STRUCT_TRAITS_END()
583 595
584 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams) 596 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams)
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 898
887 // PlzNavigate 899 // PlzNavigate
888 // Tells the renderer that a navigation failed with the error code |error_code| 900 // Tells the renderer that a navigation failed with the error code |error_code|
889 // and that the renderer should display an appropriate error page. 901 // and that the renderer should display an appropriate error page.
890 IPC_MESSAGE_ROUTED4(FrameMsg_FailedNavigation, 902 IPC_MESSAGE_ROUTED4(FrameMsg_FailedNavigation,
891 content::CommonNavigationParams, /* common_params */ 903 content::CommonNavigationParams, /* common_params */
892 content::RequestNavigationParams, /* request_params */ 904 content::RequestNavigationParams, /* request_params */
893 bool, /* stale_copy_in_cache */ 905 bool, /* stale_copy_in_cache */
894 int /* error_code */) 906 int /* error_code */)
895 907
908 // PlzNavigate
909 // Tells the renderer that a navigation was blocked because a content security
910 // policy was violated.
911 IPC_MESSAGE_ROUTED1(FrameMsg_ReportContentSecurityPolicyViolation,
912 content::CSPViolationParams /* violation_params */)
913
896 // Request to enumerate and return links to all savable resources in the frame 914 // Request to enumerate and return links to all savable resources in the frame
897 // Note: this covers only the immediate frame / doesn't cover subframes. 915 // Note: this covers only the immediate frame / doesn't cover subframes.
898 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks) 916 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks)
899 917
900 // Get html data by serializing the target frame and replacing all resource 918 // Get html data by serializing the target frame and replacing all resource
901 // links with a path to the local copy passed in the message payload. 919 // links with a path to the local copy passed in the message payload.
902 IPC_MESSAGE_ROUTED2(FrameMsg_GetSerializedHtmlWithLocalLinks, 920 IPC_MESSAGE_ROUTED2(FrameMsg_GetSerializedHtmlWithLocalLinks,
903 FrameMsg_GetSerializedHtmlWithLocalLinks_UrlMap, 921 FrameMsg_GetSerializedHtmlWithLocalLinks_UrlMap,
904 FrameMsg_GetSerializedHtmlWithLocalLinks_FrameRoutingIdMap) 922 FrameMsg_GetSerializedHtmlWithLocalLinks_FrameRoutingIdMap)
905 923
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1611 // nearest find result in the sending frame. 1629 // nearest find result in the sending frame.
1612 IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply, 1630 IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply,
1613 int /* nfr_request_id */, 1631 int /* nfr_request_id */,
1614 float /* distance */) 1632 float /* distance */)
1615 #endif 1633 #endif
1616 1634
1617 // Adding a new message? Stick to the sort order above: first platform 1635 // Adding a new message? Stick to the sort order above: first platform
1618 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then 1636 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then
1619 // platform independent FrameHostMsg, then ifdefs for platform specific 1637 // platform independent FrameHostMsg, then ifdefs for platform specific
1620 // FrameHostMsg. 1638 // FrameHostMsg.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698