Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: chrome/common/extensions/api/experimental_discovery.idl

Issue 10647003: Discovery API supports specifying a tile in a URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 // File-level comment to appease parser. Eventually this will not be necessary. 5 // File-level comment to appease parser. Eventually this will not be necessary.
6 6
7 namespace experimental.discovery { 7 namespace experimental.discovery {
8 8
9 dictionary SuggestDetails { 9 dictionary SuggestDetails {
10 // The URL to suggest and that will be displayed in the new tab page under 10 // The URL to suggest and that will be displayed in the new tab page under
11 // the recommended pane. 11 // the recommended pane.
12 DOMString linkUrl; 12 DOMString linkUrl;
13 13
14 // The linkified text. It should be relatively short. 14 // The linkified text. It should be relatively short.
15 DOMString linkText; 15 DOMString linkText;
16 16
17 // The url of the image to use as a tile.
18 DOMString? urlImage;
19
17 // A score indicating how interesting that suggestion is. The value must be 20 // A score indicating how interesting that suggestion is. The value must be
18 // between 0 and 1. A suggestion with score 1 is twice as likely to be 21 // between 0 and 1. A suggestion with score 1 is twice as likely to be
19 // displayed than one with a score of 0.5. Defaults to 1. 22 // displayed than one with a score of 0.5. Defaults to 1.
20 // TODO: need minimum=0 and maximum=1. 23 // TODO: need minimum=0 and maximum=1.
21 double? score; 24 double? score;
22 }; 25 };
23 26
24 interface Functions { 27 interface Functions {
25 // Suggests a URL for discovery. 28 // Suggests a URL for discovery.
26 // |details|: Detailed information on the URL to suggest. 29 // |details|: Detailed information on the URL to suggest.
27 static void suggest(SuggestDetails details); 30 static void suggest(SuggestDetails details);
28 31
29 // Removes a URL that was previously suggested for discovery by this 32 // Removes a URL that was previously suggested for discovery by this
30 // extension. 33 // extension.
31 // |linkUrl|: The URl to remove from discovery. Must be exactly the same as 34 // |linkUrl|: The URl to remove from discovery. Must be exactly the same as
32 // a linkUrl previously used on a call to suggest. 35 // a linkUrl previously used on a call to suggest.
33 static void removeSuggestion(DOMString linkUrl); 36 static void removeSuggestion(DOMString linkUrl);
34 37
35 // Clear all the URLs that were previously suggested for discovery by this 38 // Clear all the URLs that were previously suggested for discovery by this
36 // extension. 39 // extension.
37 static void clearAllSuggestions(); 40 static void clearAllSuggestions();
38 }; 41 };
39 }; 42 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698