summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/api/experimental_history.json
blob: f7f2290bbc9eb8ed8a25b7c5b4ccbd65455d0e25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

[
  {
    "namespace": "experimental.history",
    "description": "Use the <code>chrome.experimental.history</code> API to interact with the browser's record of most visited pages.",
    "types": [
      {
        "id": "MostVisitedItem",
        "type": "object",
        "properties": {
           "url": {"type": "string", "description": "The URL navigated to by a user."},
           "title": {"type": "string", "description": "The title of the page when it was last loaded."}
        }
      }
    ],
    "functions": [
      {
        "name": "getMostVisited",
        "type": "function",
        "description": "Retrieves most visited URLs on the time specified.",
        "parameters": [
          { "name": "details",
            "type": "object",
            "properties": {
              "filterTime": {"type": "number", "optional": true, "description": "Sets the time to be used as a basis for the query, represented in milliseconds since the epoch. Defaults to the current time."},
              "filterWidth": {"type": "number", "optional": true, "description": "Limit results to those visited at filterTime +/- this on each day, in milliseconds."},
              "dayOfTheWeek": {"type": "integer", "optional": true, "minimum": 0, "description": "Limit results to those visited on this day of the week (0 - Sunday, 1 - Monday, etc.) starting with this week."},
              "maxResults": {"type": "integer", "optional": true, "minimum": 0, "description": "The maximum number of results to retrieve. Defaults to 100."}
            }
          },
          {
            "name": "callback",
            "type": "function",
            "parameters": [
              { "name": "results", "type": "array", "items":  { "$ref": "MostVisitedItem"} }
            ]
          }
        ]
      }
    ]
  }
]