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

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, 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/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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 IPC_STRUCT_TRAITS_MEMBER(allow_download) 336 IPC_STRUCT_TRAITS_MEMBER(allow_download)
337 IPC_STRUCT_TRAITS_MEMBER(should_replace_current_entry) 337 IPC_STRUCT_TRAITS_MEMBER(should_replace_current_entry)
338 IPC_STRUCT_TRAITS_MEMBER(ui_timestamp) 338 IPC_STRUCT_TRAITS_MEMBER(ui_timestamp)
339 IPC_STRUCT_TRAITS_MEMBER(report_type) 339 IPC_STRUCT_TRAITS_MEMBER(report_type)
340 IPC_STRUCT_TRAITS_MEMBER(base_url_for_data_url) 340 IPC_STRUCT_TRAITS_MEMBER(base_url_for_data_url)
341 IPC_STRUCT_TRAITS_MEMBER(history_url_for_data_url) 341 IPC_STRUCT_TRAITS_MEMBER(history_url_for_data_url)
342 IPC_STRUCT_TRAITS_MEMBER(previews_state) 342 IPC_STRUCT_TRAITS_MEMBER(previews_state)
343 IPC_STRUCT_TRAITS_MEMBER(navigation_start) 343 IPC_STRUCT_TRAITS_MEMBER(navigation_start)
344 IPC_STRUCT_TRAITS_MEMBER(method) 344 IPC_STRUCT_TRAITS_MEMBER(method)
345 IPC_STRUCT_TRAITS_MEMBER(post_data) 345 IPC_STRUCT_TRAITS_MEMBER(post_data)
346 IPC_STRUCT_TRAITS_MEMBER(should_bypass_main_world_csp)
346 IPC_STRUCT_TRAITS_END() 347 IPC_STRUCT_TRAITS_END()
347 348
348 IPC_STRUCT_TRAITS_BEGIN(content::BeginNavigationParams) 349 IPC_STRUCT_TRAITS_BEGIN(content::BeginNavigationParams)
349 IPC_STRUCT_TRAITS_MEMBER(headers) 350 IPC_STRUCT_TRAITS_MEMBER(headers)
350 IPC_STRUCT_TRAITS_MEMBER(load_flags) 351 IPC_STRUCT_TRAITS_MEMBER(load_flags)
351 IPC_STRUCT_TRAITS_MEMBER(has_user_gesture) 352 IPC_STRUCT_TRAITS_MEMBER(has_user_gesture)
352 IPC_STRUCT_TRAITS_MEMBER(skip_service_worker) 353 IPC_STRUCT_TRAITS_MEMBER(skip_service_worker)
353 IPC_STRUCT_TRAITS_MEMBER(request_context_type) 354 IPC_STRUCT_TRAITS_MEMBER(request_context_type)
354 IPC_STRUCT_TRAITS_MEMBER(mixed_content_context_type) 355 IPC_STRUCT_TRAITS_MEMBER(mixed_content_context_type)
355 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url) 356 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url)
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 IPC_STRUCT_TRAITS_MEMBER(report_endpoints) 564 IPC_STRUCT_TRAITS_MEMBER(report_endpoints)
564 IPC_STRUCT_TRAITS_MEMBER(header) 565 IPC_STRUCT_TRAITS_MEMBER(header)
565 IPC_STRUCT_TRAITS_END() 566 IPC_STRUCT_TRAITS_END()
566 567
567 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader) 568 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader)
568 IPC_STRUCT_TRAITS_MEMBER(header_value) 569 IPC_STRUCT_TRAITS_MEMBER(header_value)
569 IPC_STRUCT_TRAITS_MEMBER(type) 570 IPC_STRUCT_TRAITS_MEMBER(type)
570 IPC_STRUCT_TRAITS_MEMBER(source) 571 IPC_STRUCT_TRAITS_MEMBER(source)
571 IPC_STRUCT_TRAITS_END() 572 IPC_STRUCT_TRAITS_END()
572 573
574 IPC_STRUCT_TRAITS_BEGIN(content::CSPViolationParams)
575 IPC_STRUCT_TRAITS_MEMBER(directive)
576 IPC_STRUCT_TRAITS_MEMBER(effective_directive)
577 IPC_STRUCT_TRAITS_MEMBER(console_message)
578 IPC_STRUCT_TRAITS_MEMBER(blocked_url)
579 IPC_STRUCT_TRAITS_MEMBER(report_endpoints)
580 IPC_STRUCT_TRAITS_MEMBER(header)
581 IPC_STRUCT_TRAITS_MEMBER(disposition)
582 IPC_STRUCT_TRAITS_MEMBER(after_redirect)
583 IPC_STRUCT_TRAITS_END()
584
573 IPC_STRUCT_TRAITS_BEGIN(content::FormFieldData) 585 IPC_STRUCT_TRAITS_BEGIN(content::FormFieldData)
574 IPC_STRUCT_TRAITS_MEMBER(text) 586 IPC_STRUCT_TRAITS_MEMBER(text)
575 IPC_STRUCT_TRAITS_MEMBER(placeholder) 587 IPC_STRUCT_TRAITS_MEMBER(placeholder)
576 IPC_STRUCT_TRAITS_MEMBER(text_input_type) 588 IPC_STRUCT_TRAITS_MEMBER(text_input_type)
577 IPC_STRUCT_TRAITS_END() 589 IPC_STRUCT_TRAITS_END()
578 590
579 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo) 591 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo)
580 IPC_STRUCT_TRAITS_MEMBER(file_path) 592 IPC_STRUCT_TRAITS_MEMBER(file_path)
581 IPC_STRUCT_TRAITS_MEMBER(display_name) 593 IPC_STRUCT_TRAITS_MEMBER(display_name)
582 IPC_STRUCT_TRAITS_MEMBER(file_system_url) 594 IPC_STRUCT_TRAITS_MEMBER(file_system_url)
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 906
895 // PlzNavigate 907 // PlzNavigate
896 // 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|
897 // and that the renderer should display an appropriate error page. 909 // and that the renderer should display an appropriate error page.
898 IPC_MESSAGE_ROUTED4(FrameMsg_FailedNavigation, 910 IPC_MESSAGE_ROUTED4(FrameMsg_FailedNavigation,
899 content::CommonNavigationParams, /* common_params */ 911 content::CommonNavigationParams, /* common_params */
900 content::RequestNavigationParams, /* request_params */ 912 content::RequestNavigationParams, /* request_params */
901 bool, /* stale_copy_in_cache */ 913 bool, /* stale_copy_in_cache */
902 int /* error_code */) 914 int /* error_code */)
903 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*/)
alexmos 2017/02/24 06:40:27 nit: space before */
arthursonzogni 2017/02/24 16:13:29 Done.
921
904 // 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
905 // Note: this covers only the immediate frame / doesn't cover subframes. 923 // Note: this covers only the immediate frame / doesn't cover subframes.
906 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks) 924 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks)
907 925
908 // 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
909 // 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.
910 IPC_MESSAGE_ROUTED2(FrameMsg_GetSerializedHtmlWithLocalLinks, 928 IPC_MESSAGE_ROUTED2(FrameMsg_GetSerializedHtmlWithLocalLinks,
911 FrameMsg_GetSerializedHtmlWithLocalLinks_UrlMap, 929 FrameMsg_GetSerializedHtmlWithLocalLinks_UrlMap,
912 FrameMsg_GetSerializedHtmlWithLocalLinks_FrameRoutingIdMap) 930 FrameMsg_GetSerializedHtmlWithLocalLinks_FrameRoutingIdMap)
913 931
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1625 // nearest find result in the sending frame. 1643 // nearest find result in the sending frame.
1626 IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply, 1644 IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply,
1627 int /* nfr_request_id */, 1645 int /* nfr_request_id */,
1628 float /* distance */) 1646 float /* distance */)
1629 #endif 1647 #endif
1630 1648
1631 // Adding a new message? Stick to the sort order above: first platform 1649 // Adding a new message? Stick to the sort order above: first platform
1632 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then 1650 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then
1633 // platform independent FrameHostMsg, then ifdefs for platform specific 1651 // platform independent FrameHostMsg, then ifdefs for platform specific
1634 // FrameHostMsg. 1652 // FrameHostMsg.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698