home *** CD-ROM | disk | FTP | other *** search
/ Freelog 115 / FreelogNo115-MaiJuin2013.iso / Internet / AvantBrowser / asetup.exe / _data / webkit / chrome.dll / 0 / BINDATA / 26531 < prev    next >
Encoding:
Text File  |  2013-04-03  |  7.1 KB  |  181 lines

  1. // Copyright (c) 2012 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. [
  6.   {
  7.     "namespace": "history",
  8.     "types": [
  9.       {
  10.         "id": "HistoryItem",
  11.         "type": "object",
  12.         "description": "An object encapsulating one result of a history query.",
  13.         "properties": {
  14.           "id": {"type": "string", "minimum": 0, "description": "The unique identifier for the item."},
  15.           "url": {"type": "string", "optional": true, "description": "The URL navigated to by a user."},
  16.           "title": {"type": "string", "optional": true, "description": "The title of the page when it was last loaded."},
  17.           "lastVisitTime": {"type": "number", "optional": true, "description": "When this page was last loaded, represented in milliseconds since the epoch."},
  18.           "visitCount": {"type": "integer", "optional": true, "description": "The number of times the user has navigated to this page."},
  19.           "typedCount": {"type": "integer", "optional": true, "description": "The number of times the user has navigated to this page by typing in the address."}
  20.         }
  21.       },
  22.       {
  23.         "id": "VisitItem",
  24.         "type": "object",
  25.         "description": "An object encapsulating one visit to a URL.",
  26.         "properties": {
  27.           "id": {"type": "string", "minimum": 0, "description": "The unique identifier for the item."},
  28.           "visitId": {"type": "string", "description": "The unique identifier for this visit."},
  29.           "visitTime": {"type": "number", "optional": true, "description": "When this visit occurred, represented in milliseconds since the epoch."},
  30.           "referringVisitId": {"type": "string", "description": "The visit ID of the referrer."},
  31.           "transition": {
  32.             "type": "string",
  33.             "enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "auto_toplevel", "form_submit", "reload", "keyword", "keyword_generated"],
  34.             "description": "The <a href='#transition_types'>transition type</a> for this visit from its referrer."
  35.           }
  36.         }
  37.       }
  38.     ],
  39.     "functions": [
  40.       {
  41.         "name": "search",
  42.         "type": "function",
  43.         "description": "Searches the history for the last visit time of each page matching the query.",
  44.         "parameters": [
  45.           {
  46.             "name": "query",
  47.             "type": "object",
  48.             "properties": {
  49.               "text": {"type": "string", "description": "A free-text query to the history service.  Leave empty to retrieve all pages."},
  50.               "startTime": {"type": "number", "optional": true, "description": "Limit results to those visited after this date, represented in milliseconds since the epoch."},
  51.               "endTime": {"type": "number", "optional": true, "description": "Limit results to those visited before this date, represented in milliseconds since the epoch."},
  52.               "maxResults": {"type": "integer", "optional": true, "minimum": 0, "description": "The maximum number of results to retrieve.  Defaults to 100."}
  53.             }
  54.           },
  55.           {
  56.             "name": "callback",
  57.             "type": "function",
  58.             "parameters": [
  59.               { "name": "results", "type": "array", "items": { "$ref": "HistoryItem"} }
  60.             ]
  61.           }
  62.         ]
  63.       },
  64.       {
  65.         "name": "getVisits",
  66.         "type": "function",
  67.         "description": "Retrieves information about visits to a URL.",
  68.         "parameters": [
  69.           {
  70.             "name": "details",
  71.             "type": "object",
  72.             "properties": {
  73.               "url": {"type": "string", "description": "The URL for which to retrieve visit information.  It must be in the format as returned from a call to history.search."}
  74.             }
  75.           },
  76.           {
  77.             "name": "callback",
  78.             "type": "function",
  79.             "parameters": [
  80.               { "name": "results", "type": "array", "items": { "$ref": "VisitItem"} }
  81.             ]
  82.           }
  83.         ]
  84.       },
  85.       {
  86.         "name": "addUrl",
  87.         "type": "function",
  88.         "description": "Adds a URL to the history at the current time with a <a href='#transition_types'>transition type</a> of \"link\".",
  89.         "parameters": [
  90.           {
  91.             "name": "details",
  92.             "type": "object",
  93.             "properties": {
  94.               "url": {"type": "string", "description": "The URL to add."}
  95.             }
  96.           },
  97.           {
  98.             "name": "callback",
  99.             "type": "function",
  100.             "optional": true,
  101.             "parameters": []
  102.           }
  103.         ]
  104.       },
  105.       {
  106.         "name": "deleteUrl",
  107.         "type": "function",
  108.         "description": "Removes all occurrences of the given URL from the history.",
  109.         "parameters": [
  110.           {
  111.             "name": "details",
  112.             "type": "object",
  113.             "properties": {
  114.               "url": {"type": "string", "description": "The URL to remove."}
  115.             }
  116.           },
  117.           {
  118.             "name": "callback",
  119.             "type": "function",
  120.             "optional": true,
  121.             "parameters": []
  122.           }
  123.         ]
  124.       },
  125.       {
  126.         "name": "deleteRange",
  127.         "type": "function",
  128.         "description": "Removes all items within the specified date range from the history.  Pages will not be removed from the history unless all visits fall within the range.",
  129.         "parameters": [
  130.           {
  131.             "name": "range",
  132.             "type": "object",
  133.             "properties": {
  134.               "startTime": { "type": "number", "description": "Items added to history after this date, represented in milliseconds since the epoch." },
  135.               "endTime": { "type": "number", "description": "Items added to history before this date, represented in milliseconds since the epoch." }
  136.             }
  137.           },
  138.           {
  139.             "name": "callback", "type": "function", "parameters": []
  140.           }
  141.         ]
  142.       },
  143.       {
  144.         "name": "deleteAll",
  145.         "type": "function",
  146.         "description": "Deletes all items from the history.",
  147.         "parameters": [
  148.           {
  149.             "name": "callback", "type": "function", "parameters": []
  150.           }
  151.         ]
  152.       }
  153.     ],
  154.     "events": [
  155.       {
  156.         "name": "onVisited",
  157.         "type": "function",
  158.         "description": "Fired when a URL is visited, providing the HistoryItem data for that URL.  This event fires before the page has loaded.",
  159.         "parameters": [
  160.           { "name": "result", "$ref": "HistoryItem"}
  161.         ]
  162.       },
  163.       {
  164.         "name": "onVisitRemoved",
  165.         "type": "function",
  166.         "description": "Fired when one or more URLs are removed from the history service.  When all visits have been removed the URL is purged from history.",
  167.         "parameters": [
  168.           {
  169.             "name": "removed",
  170.             "type": "object",
  171.             "properties": {
  172.               "allHistory": { "type": "boolean", "description": "True if all history was removed.  If true, then urls will be empty." },
  173.               "urls": { "type": "array", "items": { "type": "string" }, "optional": true}
  174.             }
  175.           }
  176.         ]
  177.       }
  178.     ]
  179.   }
  180. ]
  181.