1 /* See license.txt for terms of usage */ 2 3 define([ 4 "firebug/cookies/cookieUtils" 5 ], 6 function(CookieUtils) { 7 8 // ********************************************************************************************* // 9 // Cookie Event objects 10 11 /** 12 * This object represents a "cookie-changed" event (repObject). 13 * There are three types of cookie modify events: 14 * "changed", "added" and "deleted". 15 * Appropriate type is specified by action parameter. 16 */ 17 function CookieChangedEvent(context, cookie, action) 18 { 19 this.context = context; 20 this.cookie = cookie; 21 this.action = action; 22 this.rawHost = CookieUtils.makeStrippedHost(cookie.host); 23 } 24 25 /** 26 * This object represents "cleared" event, which is raised when the user 27 * deletes all cookies (e.g. in the system cookies dialog). 28 */ 29 function CookieClearedEvent() 30 { 31 } 32 33 /** 34 * This object represents "cookie-rejected" event, which is fired if cookies 35 * from specific domain are rejected. 36 */ 37 function CookieRejectedEvent(context, uri) 38 { 39 this.context = context; 40 this.uri = uri; 41 } 42 43 // ********************************************************************************************* // 44 // Registration 45 46 return { 47 CookieChangedEvent: CookieChangedEvent, 48 CookieClearedEvent: CookieClearedEvent, 49 CookieRejectedEvent: CookieRejectedEvent 50 }; 51 52 // ********************************************************************************************* // 53 }); 54 55