Index: chrome/renderer/searchbox/searchbox.h |
diff --git a/chrome/renderer/searchbox/searchbox.h b/chrome/renderer/searchbox/searchbox.h |
index 406bf4a3ecbefc8d6507a46357e0696c6da3e52f..934c2e389f69749f760fe04dfeb05897e7ed0996 100644 |
--- a/chrome/renderer/searchbox/searchbox.h |
+++ b/chrome/renderer/searchbox/searchbox.h |
@@ -41,7 +41,14 @@ class SearchBox : public content::RenderViewObserver, |
const chrome::search::Mode& mode() const { return mode_; } |
bool display_instant_results() const { return display_instant_results_; } |
- gfx::Rect GetRect(); |
+ // These functions return the start/end margins of the page text area, |
+ // adjusted for the page zoom. |
+ int GetStartMargin() const; |
+ int GetEndMargin() const; |
+ |
+ // Returns the bounds of the Searchbox popup in screen coordinates. |
sreeram
2012/12/05 00:14:46
Nit: searchbox -> omnibox
melevin
2012/12/06 23:13:00
Done.
|
+ gfx::Rect GetPopupBounds() const; |
+ |
const std::vector<InstantAutocompleteResult>& GetAutocompleteResults(); |
// Searchbox retains ownership of this object. |
const InstantAutocompleteResult* |
@@ -59,7 +66,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 OnThemeChanged(const ThemeBackgroundInfo& theme_info); |
void OnThemeAreaHeightChanged(int height); |
+ // Returns the current zoom factor of the render view or 1 on failure. |
+ double GetZoom() const; |
+ |
// 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_; |