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": "experimental.history", 8 "description": "Use the <code>chrome.experimental.history</code> API to interact with the browser's record of most visited pages.", 9 "types": [ 10 { 11 "id": "MostVisitedItem", 12 "type": "object", 13 "properties": { 14 "url": {"type": "string", "description": "The URL navigated to by a user."}, 15 "title": {"type": "string", "description": "The title of the page when it was last loaded."} 16 } 17 } 18 ], 19 "functions": [ 20 { 21 "name": "getMostVisited", 22 "type": "function", 23 "description": "Retrieves most visited URLs on the time specified.", 24 "parameters": [ 25 { "name": "details", 26 "type": "object", 27 "properties": { 28 "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."}, 29 "filterWidth": {"type": "number", "optional": true, "description": "Limit results to those visited at filterTime +/- this on each day, in milliseconds."}, 30 "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."}, 31 "maxResults": {"type": "integer", "optional": true, "minimum": 0, "description": "The maximum number of results to retrieve. Defaults to 100."} 32 } 33 }, 34 { 35 "name": "callback", 36 "type": "function", 37 "parameters": [ 38 { "name": "results", "type": "array", "items": { "$ref": "MostVisitedItem"} } 39 ] 40 } 41 ] 42 } 43 ] 44 } 45 ] 46