summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_omnibox_api.h
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-21 23:38:45 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-21 23:38:45 +0000
commit8d677ff0f5085bb583d1b8248f977d009ec4b867 (patch)
treea8d1cb7e23128f910a33effde71fb083e5698838 /chrome/browser/extensions/extension_omnibox_api.h
parent14f769f460022e0d28852adc9ff1ce02f4fe2871 (diff)
downloadchromium_src-8d677ff0f5085bb583d1b8248f977d009ec4b867.zip
chromium_src-8d677ff0f5085bb583d1b8248f977d009ec4b867.tar.gz
chromium_src-8d677ff0f5085bb583d1b8248f977d009ec4b867.tar.bz2
Address some visual problems with the omnibox extension API:
- Remove some of the boilerplate strings. - Allow the description field to be fully customizable and stylable. BUG=46478 BUG=46479 Review URL: http://codereview.chromium.org/2849015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50411 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_omnibox_api.h')
-rw-r--r--chrome/browser/extensions/extension_omnibox_api.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/chrome/browser/extensions/extension_omnibox_api.h b/chrome/browser/extensions/extension_omnibox_api.h
index f77e904..4af9ee5 100644
--- a/chrome/browser/extensions/extension_omnibox_api.h
+++ b/chrome/browser/extensions/extension_omnibox_api.h
@@ -5,10 +5,10 @@
#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_OMNIBOX_API_H_
#define CHROME_BROWSER_EXTENSIONS_EXTENSION_OMNIBOX_API_H_
+#include "base/string16.h"
+#include "chrome/browser/autocomplete/autocomplete.h"
#include "chrome/browser/extensions/extension_function.h"
-class ListValue;
-
// Event router class for events related to the omnibox API.
class ExtensionOmniboxEventRouter {
public:
@@ -34,6 +34,20 @@ class OmniboxSendSuggestionsFunction : public SyncExtensionFunction {
DECLARE_EXTENSION_FUNCTION_NAME("experimental.omnibox.sendSuggestions");
};
-typedef std::pair<int, ListValue*> ExtensionOmniboxSuggestions;
+struct ExtensionOmniboxSuggestion {
+ // The text that gets put in the edit box.
+ string16 content;
+
+ // The text that is displayed in the drop down.
+ string16 description;
+
+ // Contains style ranges for the description.
+ ACMatchClassifications description_styles;
+};
+
+struct ExtensionOmniboxSuggestions {
+ int request_id;
+ std::vector<ExtensionOmniboxSuggestion> suggestions;
+};
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_OMNIBOX_API_H_