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

Unified Diff: chrome/browser/instant/instant_controller.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/browser/instant/instant_controller.h
diff --git a/chrome/browser/instant/instant_controller.h b/chrome/browser/instant/instant_controller.h
index 7c9f11c834bf9191966b2bb3bd1ce88cf990caac..d99caad976d38a277a117c5c05c269dabe024ae1 100644
--- a/chrome/browser/instant/instant_controller.h
+++ b/chrome/browser/instant/instant_controller.h
@@ -91,8 +91,12 @@ class InstantController {
const string16& full_text,
bool verbatim);
- // Sets the bounds of the omnibox dropdown, in screen coordinates.
- void SetOmniboxBounds(const gfx::Rect& bounds);
+ // Sets the bounds of the omnibox popup, in screen coordinates.
+ void SetPopupBounds(const gfx::Rect& bounds);
+
+ // Sets the offset to the start and end point of the Instant page. Note that
+ // both offsets are calculated from the start edge of the page.
+ void SetMarginSize(int start, int end);
// Send autocomplete results from |providers| to the preview page.
void HandleAutocompleteResults(
@@ -208,7 +212,7 @@ class InstantController {
// the given |height|.
void Show(InstantShownReason reason, int height, InstantSizeUnits units);
- // Send the omnibox dropdown bounds to the page.
+ // Send the omnibox popup bounds to the page.
void SendBoundsToPage();
// If |template_url| is a valid TemplateURL for use with Instant, fills in
@@ -253,11 +257,17 @@ class InstantController {
// True if the active tab in the current window is the NTP, false otherwise.
bool active_tab_is_ntp_;
- // Current omnibox bounds.
- gfx::Rect omnibox_bounds_;
+ // Current omnibox popup bounds.
+ gfx::Rect popup_bounds_;
+
+ // Last popup bounds passed to the page.
+ gfx::Rect last_popup_bounds_;
+
+ // Offset from the start edge of the page to the start of the page text area.
samarth 2012/11/16 22:08:26 Page text area is a little confusing in this conte
melevin 2012/11/16 22:34:43 Yeah I suppose. I wasn't sure what we were calling
+ int start_margin_;
- // Last bounds passed to the page.
- gfx::Rect last_omnibox_bounds_;
+ // Offset from the start edge of the page to the end of the page text area.
+ int end_margin_;
// Timer used to update the bounds of the omnibox.
base::OneShotTimer<InstantController> update_bounds_timer_;
« no previous file with comments | « no previous file | chrome/browser/instant/instant_controller.cc » ('j') | chrome/browser/instant/instant_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698