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

Side by Side Diff: components/safe_browsing/common/safebrowsing_messages.h

Issue 2837603002: Content API changes to improve DOM stitching in ThreatDetails code. (Closed)
Patch Set: Use explicitly-sized int types in IPC definition Created 3 years, 7 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Multiply-included message file, so no include guard. 5 // Multiply-included message file, so no include guard.
6 6
7 #include <stdint.h>
7 #include <string> 8 #include <string>
8 #include <vector> 9 #include <vector>
9 10
10 #include "components/safe_browsing/common/safebrowsing_types.h" 11 #include "components/safe_browsing/common/safebrowsing_types.h"
11 #include "ipc/ipc_message_macros.h" 12 #include "ipc/ipc_message_macros.h"
12 #include "url/gurl.h" 13 #include "url/gurl.h"
13 #include "url/ipc/url_param_traits.h" 14 #include "url/ipc/url_param_traits.h"
14 15
15 #define IPC_MESSAGE_START SafeBrowsingMsgStart 16 #define IPC_MESSAGE_START SafeBrowsingMsgStart
16 17
17 // A node is essentially a frame. 18 // A node is essentially a frame.
18 IPC_STRUCT_BEGIN(SafeBrowsingHostMsg_ThreatDOMDetails_Node) 19 IPC_STRUCT_BEGIN(SafeBrowsingHostMsg_ThreatDOMDetails_Node)
19 // A unique ID for this node, unique to the current Render Frame. 20 // A unique ID for this node, unique to the current Render Frame.
20 IPC_STRUCT_MEMBER(int, node_id) 21 IPC_STRUCT_MEMBER(int32_t, node_id)
21 22
22 // URL of this resource. Can be empty. 23 // URL of this resource. Can be empty.
23 IPC_STRUCT_MEMBER(GURL, url) 24 IPC_STRUCT_MEMBER(GURL, url)
24 25
25 // If this resource was in the "src" attribute of a tag, this is the tagname 26 // If this resource was in the "src" attribute of a tag, this is the tagname
26 // (eg "IFRAME"). Can be empty. 27 // (eg "IFRAME"). Can be empty.
27 IPC_STRUCT_MEMBER(std::string, tag_name) 28 IPC_STRUCT_MEMBER(std::string, tag_name)
28 29
29 // URL of the parent node. Can be empty. 30 // URL of the parent node. Can be empty.
30 IPC_STRUCT_MEMBER(GURL, parent) 31 IPC_STRUCT_MEMBER(GURL, parent)
31 32
32 // The unique ID of the parent node. Can be 0 if this is the top node. 33 // The unique ID of the parent node. Can be 0 if this is the top node.
33 IPC_STRUCT_MEMBER(int, parent_node_id) 34 IPC_STRUCT_MEMBER(int32_t, parent_node_id)
34 35
35 // children of this node. Can be emtpy. 36 // children of this node. Can be emtpy.
36 IPC_STRUCT_MEMBER(std::vector<GURL>, children) 37 IPC_STRUCT_MEMBER(std::vector<GURL>, children)
37 38
38 // The unique IDs of the child nodes. Can be empty if there are no children. 39 // The unique IDs of the child nodes. Can be empty if there are no children.
39 IPC_STRUCT_MEMBER(std::vector<int>, child_node_ids) 40 IPC_STRUCT_MEMBER(std::vector<int32_t>, child_node_ids)
40 41
41 // The node's attributes, as a collection of name-value pairs. 42 // The node's attributes, as a collection of name-value pairs.
42 IPC_STRUCT_MEMBER(std::vector<safe_browsing::AttributeNameValue>, attributes) 43 IPC_STRUCT_MEMBER(std::vector<safe_browsing::AttributeNameValue>, attributes)
44
45 // If this node represents a frame or iframe, then this field is set to the
46 // routing ID of the local or remote frame in this renderer process that is
47 // responsible for rendering the contents of this frame (to handle OOPIFs).
48 IPC_STRUCT_MEMBER(int32_t, child_frame_routing_id)
43 IPC_STRUCT_END() 49 IPC_STRUCT_END()
44 50
45 // SafeBrowsing client-side detection messages sent from the renderer to the 51 // SafeBrowsing client-side detection messages sent from the renderer to the
46 // browser. 52 // browser.
47 53
48 // Send part of the DOM to the browser, to be used in a threat report. 54 // Send part of the DOM to the browser, to be used in a threat report.
49 IPC_MESSAGE_ROUTED1(SafeBrowsingHostMsg_ThreatDOMDetails, 55 IPC_MESSAGE_ROUTED1(SafeBrowsingHostMsg_ThreatDOMDetails,
50 std::vector<SafeBrowsingHostMsg_ThreatDOMDetails_Node>) 56 std::vector<SafeBrowsingHostMsg_ThreatDOMDetails_Node>)
51 57
52 #if defined(FULL_SAFE_BROWSING) 58 #if defined(FULL_SAFE_BROWSING)
(...skipping 17 matching lines...) Expand all
70 // The string is an encoded safe_browsing::ClientSideModel protocol buffer, or 76 // The string is an encoded safe_browsing::ClientSideModel protocol buffer, or
71 // empty to disable client-side phishing detection for this renderer. 77 // empty to disable client-side phishing detection for this renderer.
72 IPC_MESSAGE_CONTROL1(SafeBrowsingMsg_SetPhishingModel, 78 IPC_MESSAGE_CONTROL1(SafeBrowsingMsg_SetPhishingModel,
73 std::string /* encoded ClientSideModel proto */) 79 std::string /* encoded ClientSideModel proto */)
74 80
75 // Tells the renderer to begin phishing detection for the given toplevel URL 81 // Tells the renderer to begin phishing detection for the given toplevel URL
76 // which it has started loading. 82 // which it has started loading.
77 IPC_MESSAGE_ROUTED1(SafeBrowsingMsg_StartPhishingDetection, 83 IPC_MESSAGE_ROUTED1(SafeBrowsingMsg_StartPhishingDetection,
78 GURL) 84 GURL)
79 #endif 85 #endif
OLDNEW
« no previous file with comments | « components/safe_browsing/browser/threat_details.cc ('k') | components/safe_browsing/renderer/threat_dom_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698