Chromium Code Reviews| Index: chrome/common/extensions/api/experimental.discovery.json |
| diff --git a/chrome/common/extensions/api/experimental.discovery.json b/chrome/common/extensions/api/experimental.discovery.json |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..105498573559b03bd7345249fe8f167f335b281c |
| --- /dev/null |
| +++ b/chrome/common/extensions/api/experimental.discovery.json |
| @@ -0,0 +1,55 @@ |
| +// 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.discovery", |
| + "functions": [ |
| + { |
| + "name": "suggest", |
| + "type": "function", |
| + "description": "Suggests a URL for discovery.", |
| + "parameters": [ |
| + { |
| + "type": "object", |
| + "name": "details", |
| + "properties": { |
| + "linkUrl": { |
| + "type": "string", |
| + "description": "The URL to suggest and that will be displayed in the new tab page under the recommended pane." |
| + }, |
| + "linkText": { |
| + "type": "string", |
| + "description": "The linkified text. It should be relatively short." |
| + }, |
| + "score": { |
| + "type": "number", |
| + "optional": true, |
| + "description": "A score indicating how interesting that suggestion is. A score of 2 is twice as likely to be displayed than a score of 1. Defaults to 1." |
|
Aaron Boodman
2012/05/11 21:06:46
What is the range of this number? Are non-integral
beaudoin
2012/05/14 23:28:02
Forced to be within the 0-1 range. Added a check (
|
| + } |
| + } |
| + } |
| + ] |
| + }, |
| + { |
| + "name": "clearSuggestion", |
|
Aaron Boodman
2012/05/11 21:06:46
Should there be a way to get the current suggestio
Aaron Boodman
2012/05/11 21:06:46
Suggest "removeSuggestion". "clear" usually means
beaudoin
2012/05/14 23:28:02
Done.
|
| + "type": "function", |
| + "description": "Clear a URL that was previously suggested for discovery.", |
| + "parameters": [ |
| + { |
| + "type": "string", |
| + "name": "linkUrl", |
| + "description": "The URL to remove from discovery. Must be exactly the same as a URL previously used on a call to <a href=\"experimental.discovery.html#method-suggest\"><var>suggest</var></a>." |
| + } |
| + ] |
| + }, |
| + { |
| + "name": "clearAllSuggestions", |
| + "type": "function", |
| + "description": "Clear all URLs that were previously suggested for discovery.", |
| + "parameters": [] |
| + } |
| + ] |
| + } |
| +] |