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

Side by Side Diff: chrome/browser/extensions/extension_omnibox_api.h

Issue 2078021: First pass at experimental omnibox API. There are plenty of rough edges and (Closed)
Patch Set: no prefer_keyword Created 10 years, 6 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
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_OMNIBOX_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_OMNIBOX_API_H_
7
8 #include "chrome/browser/extensions/extension_function.h"
9
10 class ListValue;
11
12 // Event router class for events related to the omnibox API.
13 class ExtensionOmniboxEventRouter {
14 public:
15 // The user has changed what is typed into the omnibox while in an extension
16 // keyword session. Returns true if someone is listening to this event, and
17 // thus we have some degree of confidence we'll get a response.
18 static bool OnInputChanged(
19 Profile* profile, const std::string& extension_id,
20 const std::string& input, int suggest_id);
21
22 // The user has accepted the omnibox input.
23 static void OnInputEntered(
24 Profile* profile, const std::string& extension_id,
25 const std::string& input);
26
27 private:
28 DISALLOW_COPY_AND_ASSIGN(ExtensionOmniboxEventRouter);
29 };
30
31 class OmniboxSendSuggestionsFunction : public SyncExtensionFunction {
32 public:
33 virtual bool RunImpl();
34 DECLARE_EXTENSION_FUNCTION_NAME("experimental.omnibox.sendSuggestions");
35 };
36
37 typedef std::pair<int, ListValue*> ExtensionOmniboxSuggestions;
38
39 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_OMNIBOX_API_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_message_service.cc ('k') | chrome/browser/extensions/extension_omnibox_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698