OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 [ | 5 [ |
6 { | 6 { |
7 "namespace": "history", | 7 "namespace": "history", |
8 "types": [ | 8 "types": [ |
9 { | 9 { |
10 "id": "HistoryItem", | 10 "id": "HistoryItem", |
(...skipping 16 matching lines...) Expand all Loading... |
27 "id": {"type": "string", "minimum": 0, "description": "The unique iden
tifier for the item."}, | 27 "id": {"type": "string", "minimum": 0, "description": "The unique iden
tifier for the item."}, |
28 "visitId": {"type": "string", "description": "The unique identifier fo
r this visit."}, | 28 "visitId": {"type": "string", "description": "The unique identifier fo
r this visit."}, |
29 "visitTime": {"type": "number", "optional": true, "description": "When
this visit occurred, represented in milliseconds since the epoch."}, | 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."}, | 30 "referringVisitId": {"type": "string", "description": "The visit ID of
the referrer."}, |
31 "transition": { | 31 "transition": { |
32 "type": "string", | 32 "type": "string", |
33 "enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_
subframe", "generated", "start_page", "form_submit", "reload", "keyword", "keywo
rd_generated"], | 33 "enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_
subframe", "generated", "start_page", "form_submit", "reload", "keyword", "keywo
rd_generated"], |
34 "description": "The <a href='#transition_types'>transition type</a>
for this visit from its referrer." | 34 "description": "The <a href='#transition_types'>transition type</a>
for this visit from its referrer." |
35 } | 35 } |
36 } | 36 } |
| 37 }, |
| 38 { |
| 39 "id": "MostVisitedURL", |
| 40 "type": "object", |
| 41 "description": "An object encapsulating a most visited URL, such as the
URLs on the new tab page.", |
| 42 "properties": { |
| 43 "url": {"type": "string", "description": "The most visited URL."}, |
| 44 "title": {"type": "string", "description": "The title of the page"}, |
| 45 "redirects": {"type": "array", "items": { "type": "string" }, "descrip
tion": "The redirect history of the URL."} |
| 46 } |
37 } | 47 } |
38 ], | 48 ], |
39 "functions": [ | 49 "functions": [ |
40 { | 50 { |
41 "name": "search", | 51 "name": "search", |
42 "type": "function", | 52 "type": "function", |
43 "description": "Searches the history for the last visit time of each pag
e matching the query.", | 53 "description": "Searches the history for the last visit time of each pag
e matching the query.", |
44 "parameters": [ | 54 "parameters": [ |
45 { | 55 { |
46 "name": "query", | 56 "name": "query", |
(...skipping 29 matching lines...) Expand all Loading... |
76 { | 86 { |
77 "name": "callback", | 87 "name": "callback", |
78 "type": "function", | 88 "type": "function", |
79 "parameters": [ | 89 "parameters": [ |
80 { "name": "results", "type": "array", "items": { "$ref": "VisitIte
m"} } | 90 { "name": "results", "type": "array", "items": { "$ref": "VisitIte
m"} } |
81 ] | 91 ] |
82 } | 92 } |
83 ] | 93 ] |
84 }, | 94 }, |
85 { | 95 { |
| 96 "name": "getMostVisited", |
| 97 "type": "function", |
| 98 "description": "Retrieves the N most visited history items.", |
| 99 "parameters": [ |
| 100 { |
| 101 "name": "details", |
| 102 "type": "object", |
| 103 "properties": { |
| 104 "maxResults": { |
| 105 "type": "integer", |
| 106 "description": "An integer representing the number of entries yo
u want to retreive." |
| 107 } |
| 108 } |
| 109 }, |
| 110 { |
| 111 "name": "callback", |
| 112 "type": "function", |
| 113 "parameters": [ |
| 114 { "name": "results", "type": "array", "items": { "$ref": "MostVisi
tedURL"} } |
| 115 ] |
| 116 } |
| 117 ] |
| 118 }, |
| 119 { |
86 "name": "addUrl", | 120 "name": "addUrl", |
87 "type": "function", | 121 "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\".", | 122 "description": "Adds a URL to the history at the current time with a <a
href='#transition_types'>transition type</a> of \"link\".", |
89 "parameters": [ | 123 "parameters": [ |
90 { | 124 { |
91 "name": "details", | 125 "name": "details", |
92 "type": "object", | 126 "type": "object", |
93 "properties": { | 127 "properties": { |
94 "url": {"type": "string", "description": "The URL to add."} | 128 "url": {"type": "string", "description": "The URL to add."} |
95 } | 129 } |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 "properties": { | 193 "properties": { |
160 "allHistory": { "type": "boolean", "description": "True if all his
tory was removed. If true, then urls will be empty." }, | 194 "allHistory": { "type": "boolean", "description": "True if all his
tory was removed. If true, then urls will be empty." }, |
161 "urls": { "type": "array", "items": { "type": "string" }, "optiona
l": true} | 195 "urls": { "type": "array", "items": { "type": "string" }, "optiona
l": true} |
162 } | 196 } |
163 } | 197 } |
164 ] | 198 ] |
165 } | 199 } |
166 ] | 200 ] |
167 } | 201 } |
168 ] | 202 ] |
OLD | NEW |