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

Unified Diff: chrome/browser/ui/omnibox/omnibox_edit_model.cc

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/ui/omnibox/omnibox_edit_model.cc
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
index 188611d51c8d59bf58b73013b81d2d9bb9549725..2fe45b33b05fc4989d36c88a4ef88d586f6ee389 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -1009,6 +1009,12 @@ bool OmniboxEditModel::OnAfterPossibleChange(const string16& old_text,
void OmniboxEditModel::PopupBoundsChangedTo(const gfx::Rect& bounds) {
InstantController* instant = controller_->GetInstant();
if (instant)
+ instant->SetPopupBounds(bounds);
+}
+
+void OmniboxEditModel::OmniboxBoundsChangedTo(const gfx::Rect& bounds) {
+ InstantController* instant = controller_->GetInstant();
+ if (instant)
instant->SetOmniboxBounds(bounds);
}
@@ -1045,6 +1051,9 @@ void OmniboxEditModel::OnResultChanged(bool default_match_changed) {
popup_->OnResultChanged();
}
+ // TODO(melevin): Find a better place to call this.
+ OmniboxBoundsChangedTo(view_->GetBounds());
dhollowa 2012/11/14 17:20:46 The OmniboxView class holds a pointer to an Omnibo
melevin 2012/11/14 22:16:27 Thanks, this is much cleaner.
+
if (popup_->IsOpen()) {
PopupBoundsChangedTo(popup_->view()->GetTargetBounds());
} else if (was_open) {

Powered by Google App Engine
This is Rietveld 408576698