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 3 // found in the LICENSE file. 4 5 // Multiply-included message file, so no include guard. 6 7 #include "googleurl/src/gurl.h" 8 #include "ipc/ipc_message_macros.h" 9 #include "ipc/ipc_platform_file.h" 10 11 #define IPC_MESSAGE_START SafeBrowsingMsgStart 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 29 // SafeBrowsing client-side detection messages sent from the renderer to the 30 // browser. 31 32 // Inform the browser that the URL in the given ClientPhishingRequest proto is 33 // phishing according to the client-side phishing detector. 34 // TODO(noelutz): we may want to create custom ParamTraits for MessageLite to 35 // have a generic way to send protocol messages over IPC. 36 IPC_MESSAGE_ROUTED1(SafeBrowsingHostMsg_DetectedPhishingSite, 37 std::string /* encoded ClientPhishingRequest proto */) 38 39 // Send part of the DOM to the browser, to be used in a malware report. 40 IPC_MESSAGE_ROUTED1(SafeBrowsingHostMsg_MalwareDOMDetails, 41 std::vector<SafeBrowsingHostMsg_MalwareDOMDetails_Node>) 42 43 // SafeBrowsing client-side detection messages sent from the browser to the 44 // renderer. 45 46 // A classification model for client-side phishing detection. 47 // The given file contains an encoded safe_browsing::ClientSideModel 48 // protocol buffer. 49 IPC_MESSAGE_CONTROL1(SafeBrowsingMsg_SetPhishingModel, 50 IPC::PlatformFileForTransit /* model_file */) 51 52 // Request a DOM tree when a malware interstitial is shown. 53 IPC_MESSAGE_ROUTED0(SafeBrowsingMsg_GetMalwareDOMDetails) 54 55 // Tells the renderer to begin phishing detection for the given toplevel URL 56 // which it has started loading. 57 IPC_MESSAGE_ROUTED1(SafeBrowsingMsg_StartPhishingDetection, 58 GURL) 59