Index: chrome/renderer/searchbox/searchbox.h |
diff --git a/chrome/renderer/searchbox/searchbox.h b/chrome/renderer/searchbox/searchbox.h |
index d6105614013b126e55ad19e05473810ce8b0f9b8..b2f411d62fffdb6014bfe8f071bf4e5b4f93a358 100644 |
--- a/chrome/renderer/searchbox/searchbox.h |
+++ b/chrome/renderer/searchbox/searchbox.h |
@@ -44,7 +44,14 @@ class SearchBox : public content::RenderViewObserver, |
int results_base() const { return results_base_; } |
bool active_tab_is_ntp() const { return active_tab_is_ntp_; } |
- gfx::Rect GetRect(); |
+ // These functions return the start/end margins of the page text area |
+ // adjusted for the page zoom. |
+ int GetStartMargin(); |
+ int GetEndMargin(); |
+ |
+ // Returns the bounds of the Searchbox popup in screen coordinates. |
+ gfx::Rect GetPopupBounds(); |
+ |
const std::vector<InstantAutocompleteResult>& GetAutocompleteResults(); |
// Searchbox retains ownership of this object. |
const InstantAutocompleteResult* |
@@ -60,7 +67,8 @@ class SearchBox : public content::RenderViewObserver, |
size_t selection_end); |
void OnSubmit(const string16& query); |
void OnCancel(const string16& query); |
- void OnResize(const gfx::Rect& bounds); |
+ void OnPopupResize(const gfx::Rect& bounds); |
+ void OnMarginChange(int start, int end); |
void OnDetermineIfPageSupportsInstant(); |
void OnAutocompleteResults( |
const std::vector<InstantAutocompleteResult>& results); |
@@ -69,6 +77,9 @@ class SearchBox : public content::RenderViewObserver, |
void OnBlur(); |
void OnActiveTabModeChanged(bool active_tab_is_ntp); |
+ // Returns the current zoom factor of the render view or 1 on failure. |
+ double GetZoom(); |
+ |
// Sets the searchbox values to their initial value. |
void Reset(); |
@@ -77,7 +88,9 @@ class SearchBox : public content::RenderViewObserver, |
size_t selection_start_; |
size_t selection_end_; |
size_t results_base_; |
- gfx::Rect rect_; |
+ int start_margin_; |
+ int end_margin_; |
+ gfx::Rect popup_bounds_; |
std::vector<InstantAutocompleteResult> autocomplete_results_; |
size_t last_results_base_; |
std::vector<InstantAutocompleteResult> last_autocomplete_results_; |