| OLD | NEW |
| 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 "chrome/common/common_param_traits.h" | |
| 8 #include "googleurl/src/gurl.h" | 7 #include "googleurl/src/gurl.h" |
| 9 #include "ipc/ipc_message_macros.h" | 8 #include "ipc/ipc_message_macros.h" |
| 9 #include "ipc/ipc_platform_file.h" |
| 10 | 10 |
| 11 #define IPC_MESSAGE_START SafeBrowsingMsgStart | 11 #define IPC_MESSAGE_START SafeBrowsingMsgStart |
| 12 | 12 |
| 13 // A node is essentially a frame. |
| 14 IPC_STRUCT_BEGIN(SafeBrowsingHostMsg_MalwareDOMDetails_Node) |
| 15 // URL of this resource. Can be empty. |
| 16 IPC_STRUCT_MEMBER(GURL, url) |
| 17 |
| 18 // If this resource was in the "src" attribute of a tag, this is the tagname |
| 19 // (eg "IFRAME"). Can be empty. |
| 20 IPC_STRUCT_MEMBER(std::string, tag_name) |
| 21 |
| 22 // URL of the parent node. Can be empty. |
| 23 IPC_STRUCT_MEMBER(GURL, parent) |
| 24 |
| 25 // children of this node. Can be emtpy. |
| 26 IPC_STRUCT_MEMBER(std::vector<GURL>, children) |
| 27 IPC_STRUCT_END() |
| 28 |
| 13 // SafeBrowsing client-side detection messages sent from the renderer to the | 29 // SafeBrowsing client-side detection messages sent from the renderer to the |
| 14 // browser. | 30 // browser. |
| 15 | 31 |
| 16 // Inform the browser that the current URL is phishing according to the | 32 // Inform the browser that the current URL is phishing according to the |
| 17 // client-side phishing detector. | 33 // client-side phishing detector. |
| 18 IPC_MESSAGE_ROUTED2(SafeBrowsingDetectionHostMsg_DetectedPhishingSite, | 34 IPC_MESSAGE_ROUTED2(SafeBrowsingHostMsg_DetectedPhishingSite, |
| 19 GURL /* phishing_url */, | 35 GURL /* phishing_url */, |
| 20 double /* phishing_score */) | 36 double /* phishing_score */) |
| 21 | 37 |
| 38 // Send part of the DOM to the browser, to be used in a malware report. |
| 39 IPC_MESSAGE_ROUTED1(SafeBrowsingHostMsg_MalwareDOMDetails, |
| 40 std::vector<SafeBrowsingHostMsg_MalwareDOMDetails_Node>) |
| 41 |
| 22 // SafeBrowsing client-side detection messages sent from the browser to the | 42 // SafeBrowsing client-side detection messages sent from the browser to the |
| 23 // renderer. TODO(noelutz): move other IPC messages here. | 43 // renderer. |
| 24 | 44 |
| 45 // A classification model for client-side phishing detection. |
| 46 // The given file contains an encoded safe_browsing::ClientSideModel |
| 47 // protocol buffer. |
| 48 IPC_MESSAGE_CONTROL1(SafeBrowsingMsg_SetPhishingModel, |
| 49 IPC::PlatformFileForTransit /* model_file */) |
| 50 |
| 51 // Request a DOM tree when a malware interstitial is shown. |
| 52 IPC_MESSAGE_ROUTED0(SafeBrowsingMsg_GetMalwareDOMDetails) |
| 53 |
| 54 // Tells the renderer to begin phishing detection for the given toplevel URL |
| 55 // which it has started loading. |
| 56 IPC_MESSAGE_ROUTED1(SafeBrowsingMsg_StartPhishingDetection, |
| 57 GURL) |
| OLD | NEW |