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

Unified Diff: chrome/common/extensions/api/experimental_discovery.idl

Issue 10391034: Scaffolding for an experimental discovery API letting users inject links in the recommended pane of… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Answered review comments from PatchSet 4. Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/api/api.gyp ('k') | chrome/common/extensions/docs/experimental.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/experimental_discovery.idl
diff --git a/chrome/common/extensions/api/experimental_discovery.idl b/chrome/common/extensions/api/experimental_discovery.idl
new file mode 100644
index 0000000000000000000000000000000000000000..cd31a72e3dc3ffc74a5c219a61aec106d03f6947
--- /dev/null
+++ b/chrome/common/extensions/api/experimental_discovery.idl
@@ -0,0 +1,39 @@
+// 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.
+
+// File-level comment to appease parser. Eventually this will not be necessary.
+
+namespace experimental.discovery {
+
+ dictionary SuggestDetails {
+ // The URL to suggest and that will be displayed in the new tab page under
+ // the recommended pane.
+ DOMString linkUrl;
+
+ // The linkified text. It should be relatively short.
+ DOMString linkText;
+
+ // A score indicating how interesting that suggestion is. The value must be
+ // between 0 and 1. A suggestion with score 1 is twice as likely to be
+ // displayed than one with a score of 0.5. Defaults to 1.
+ // TODO: need minimum=0 and maximum=1.
+ double? score;
+ };
+
+ interface Functions {
+ // Suggests a URL for discovery.
+ // |details|: Detailed information on the URL to suggest.
+ static void suggest(SuggestDetails details);
+
+ // Removes a URL that was previously suggested for discovery by this
+ // extension.
+ // |linkUrl|: The URl to remove from discovery. Must be exactly the same as
+ // a linkUrl previously used on a call to suggest.
+ static void removeSuggestion(DOMString linkUrl);
+
+ // Clear all the URLs that were previously suggested for discovery by this
+ // extension.
+ static void clearAllSuggestions();
+ };
+};
« no previous file with comments | « chrome/common/extensions/api/api.gyp ('k') | chrome/common/extensions/docs/experimental.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698