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

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

Issue 11359198: Implement the Instant extended API startMargin, endMargin, and rtl properties and the onmarginchang… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
Index: chrome/renderer/searchbox/searchbox.h
diff --git a/chrome/renderer/searchbox/searchbox.h b/chrome/renderer/searchbox/searchbox.h
index d6105614013b126e55ad19e05473810ce8b0f9b8..591b8926a626dad0ea723fefa8e197f70cde87c9 100644
--- a/chrome/renderer/searchbox/searchbox.h
+++ b/chrome/renderer/searchbox/searchbox.h
@@ -44,7 +44,12 @@ 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();
+ // Returns the bounds of the Omnibox in screen coordinates.
+ gfx::Rect GetOmniboxBounds();
+
+ // 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 +65,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 OnOmniboxResize(const gfx::Rect& bounds);
void OnDetermineIfPageSupportsInstant();
void OnAutocompleteResults(
const std::vector<InstantAutocompleteResult>& results);
@@ -68,6 +74,7 @@ class SearchBox : public content::RenderViewObserver,
void OnFocus();
void OnBlur();
void OnActiveTabModeChanged(bool active_tab_is_ntp);
+ gfx::Rect GetZoomedBounds(const gfx::Rect);
// Sets the searchbox values to their initial value.
void Reset();
@@ -77,7 +84,8 @@ class SearchBox : public content::RenderViewObserver,
size_t selection_start_;
size_t selection_end_;
size_t results_base_;
- gfx::Rect rect_;
+ gfx::Rect omnibox_bounds_;
+ gfx::Rect popup_bounds_;
std::vector<InstantAutocompleteResult> autocomplete_results_;
size_t last_results_base_;
std::vector<InstantAutocompleteResult> last_autocomplete_results_;

Powered by Google App Engine
This is Rietveld 408576698