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

Unified Diff: chrome/renderer/searchbox/searchbox.h

Issue 10809063: Adding Javascript support for the Extended Searchbox API. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removing clear method. Created 8 years, 4 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/renderer/resources/extensions/searchbox_api.js ('k') | chrome/renderer/searchbox/searchbox.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/searchbox/searchbox.h
diff --git a/chrome/renderer/searchbox/searchbox.h b/chrome/renderer/searchbox/searchbox.h
index 632db0b9c3a79c7e481e7347ea374cf11f3eb2ca..d5c8c0584c4eed859ce57f300e0e980411b4ca0e 100644
--- a/chrome/renderer/searchbox/searchbox.h
+++ b/chrome/renderer/searchbox/searchbox.h
@@ -29,36 +29,49 @@ class SearchBox : public content::RenderViewObserver,
virtual ~SearchBox();
// Sends ViewHostMsg_SetSuggestions to the browser.
- void SetSuggestions(const std::vector<string16>& suggestions,
- InstantCompleteBehavior behavior);
+ void SetSuggestions(const std::vector<InstantSuggestion>& suggestions);
- const string16& value() const { return value_; }
+ // Sends ViewHostMsg_SetInstantPreviewHeight to the browser.
+ void SetInstantPreviewHeight(int height, InstantSizeUnits units);
+
+ const string16& query() const { return query_; }
bool verbatim() const { return verbatim_; }
size_t selection_start() const { return selection_start_; }
size_t selection_end() const { return selection_end_; }
+ int results_base() const { return results_base_; }
gfx::Rect GetRect();
+ const std::vector<InstantAutocompleteResult>& autocomplete_results() const {
+ return autocomplete_results_;
+ }
+ int key_code() const { return key_code_; }
private:
// RenderViewObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
- void OnChange(const string16& value,
+ void OnChange(const string16& query,
bool verbatim,
size_t selection_start,
size_t selection_end);
- void OnSubmit(const string16& value);
- void OnCancel(const string16& value);
+ void OnSubmit(const string16& query);
+ void OnCancel(const string16& query);
void OnResize(const gfx::Rect& bounds);
void OnDetermineIfPageSupportsInstant();
+ void OnAutocompleteResults(
+ const std::vector<InstantAutocompleteResult>& results);
+ void OnKeyPress(int key_code);
// Sets the searchbox values to their initial value.
void Reset();
- string16 value_;
+ string16 query_;
bool verbatim_;
size_t selection_start_;
size_t selection_end_;
+ int results_base_;
gfx::Rect rect_;
+ std::vector<InstantAutocompleteResult> autocomplete_results_;
+ int key_code_;
DISALLOW_COPY_AND_ASSIGN(SearchBox);
};
« no previous file with comments | « chrome/renderer/resources/extensions/searchbox_api.js ('k') | chrome/renderer/searchbox/searchbox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698