Index: chrome/renderer/searchbox.h |
diff --git a/chrome/renderer/searchbox.h b/chrome/renderer/searchbox.h |
index 844787068ed4d29926adb1e40e256d71fae00a1b..b7efd142a3eee5c0f00cdd34a455e6fd8d9c51da 100644 |
--- a/chrome/renderer/searchbox.h |
+++ b/chrome/renderer/searchbox.h |
@@ -29,14 +29,25 @@ 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); |
+ |
+ // Sends ViewHostMsg_SetInstantPreviewHeight to the browser. |
+ void SetInstantPreviewHeight(int height, InstantSizeUnits units); |
const string16& value() const { return value_; } |
bool verbatim() const { return verbatim_; } |
size_t selection_start() const { return selection_start_; } |
size_t selection_end() const { return selection_end_; } |
+ int rid_base() const { return rid_base_; } |
sreeram
2012/08/09 22:13:51
"RID" is too cryptic. Let's make it "results_base"
Shishir
2012/08/10 18:16:57
Done.
|
gfx::Rect GetRect(); |
+ const std::vector<InstantAutocompleteResult>& instant_autocomplete_results() |
+ const { |
+ return instant_autocomplete_results_; |
+ } |
+ int key_code() const { return key_code_; } |
+ const string16& last_query() const { return last_query_; } |
+ const string16& current_url() const { return current_url_; } |
+ bool is_focused() const { return is_focused_; } |
sreeram
2012/08/09 22:13:51
As with the IPCs, let's drop the last_query(), cur
Shishir
2012/08/10 18:16:57
Done.
|
private: |
// RenderViewObserver implementation. |
@@ -50,6 +61,13 @@ class SearchBox : public content::RenderViewObserver, |
void OnCancel(const string16& value); |
void OnResize(const gfx::Rect& bounds); |
void OnDetermineIfPageSupportsInstant(); |
+ void OnInstantAutocompleteResults( |
sreeram
2012/08/09 22:13:51
OnInstantAutocompleteResults -> OnAutocompleteResu
Shishir
2012/08/10 18:16:57
Done.
|
+ const std::vector<InstantAutocompleteResult>& results); |
+ void OnKeyPress(int key_code); |
+ void OnLastQuery(const string16& last_query); |
+ void OnCurrentURL(const string16& current_url); |
+ void OnFocused(); |
+ void OnBlurred(); |
// Sets the searchbox values to their initial value. |
void Reset(); |
@@ -58,7 +76,13 @@ class SearchBox : public content::RenderViewObserver, |
bool verbatim_; |
size_t selection_start_; |
size_t selection_end_; |
+ int rid_base_; |
gfx::Rect rect_; |
+ std::vector<InstantAutocompleteResult> instant_autocomplete_results_; |
sreeram
2012/08/09 22:13:51
Drop "instant_": std::vector<InstantAutocompleteRe
Shishir
2012/08/10 18:16:57
Done.
|
+ int key_code_; |
+ string16 last_query_; |
+ string16 current_url_; |
+ bool is_focused_; |
DISALLOW_COPY_AND_ASSIGN(SearchBox); |
}; |