| OLD | NEW |
| (Empty) | |
| 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 namespace experimental.discovery { |
| 6 |
| 7 dictionary SuggestDetails { |
| 8 // The URL to suggest and that will be displayed in the new tab page under |
| 9 // the recommended pane. |
| 10 DOMString linkUrl; |
| 11 |
| 12 // The linkified text. It should be relatively short. |
| 13 DOMString linkText; |
| 14 |
| 15 // The url of the image to use as a tile. |
| 16 DOMString? urlImage; |
| 17 |
| 18 // A score indicating how interesting that suggestion is. The value must be |
| 19 // between 0 and 1. A suggestion with score 1 is twice as likely to be |
| 20 // displayed than one with a score of 0.5. Defaults to 1. |
| 21 // TODO: need minimum=0 and maximum=1. |
| 22 double? score; |
| 23 }; |
| 24 |
| 25 interface Functions { |
| 26 // Suggests a URL for discovery. |
| 27 // |details|: Detailed information on the URL to suggest. |
| 28 static void suggest(SuggestDetails details); |
| 29 |
| 30 // Removes a URL that was previously suggested for discovery by this |
| 31 // extension. |
| 32 // |linkUrl|: The URl to remove from discovery. Must be exactly the same as |
| 33 // a linkUrl previously used on a call to suggest. |
| 34 static void removeSuggestion(DOMString linkUrl); |
| 35 |
| 36 // Clear all the URLs that were previously suggested for discovery by this |
| 37 // extension. |
| 38 static void clearAllSuggestions(); |
| 39 }; |
| 40 }; |
| OLD | NEW |