| Index: chrome/browser/instant/instant_controller.cc
|
| diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
|
| index b7b0f1643ae1aeef9dc3b4f66006750eedaba246..c95098b844c67ff9c2450235f006b94fa2b75f94 100644
|
| --- a/chrome/browser/instant/instant_controller.cc
|
| +++ b/chrome/browser/instant/instant_controller.cc
|
| @@ -179,8 +179,8 @@ InstantController::InstantController(chrome::BrowserInstantController* browser,
|
| last_transition_type_(content::PAGE_TRANSITION_LINK),
|
| last_match_was_search_(false),
|
| omnibox_focus_state_(OMNIBOX_FOCUS_NONE),
|
| - start_margin_(0),
|
| - end_margin_(0),
|
| + location_bar_margin_(0),
|
| + location_bar_width_(0),
|
| allow_preview_to_show_search_suggestions_(false) {
|
| }
|
|
|
| @@ -429,16 +429,17 @@ void InstantController::SetPopupBounds(const gfx::Rect& bounds) {
|
| }
|
| }
|
|
|
| -void InstantController::SetMarginSize(int start, int end) {
|
| - if (!extended_enabled_ || (start_margin_ == start && end_margin_ == end))
|
| +void InstantController::SetLocationBarMarginAndWidth(int margin, int width) {
|
| + if (!extended_enabled_ ||
|
| + (location_bar_margin_ == margin && location_bar_width_ == width))
|
| return;
|
|
|
| - start_margin_ = start;
|
| - end_margin_ = end;
|
| + location_bar_margin_ = margin;
|
| + location_bar_width_ = width;
|
| if (loader_)
|
| - loader_->SetMarginSize(start_margin_, end_margin_);
|
| + loader_->SetLocationBarMarginAndWidth(margin, width);
|
| if (instant_tab_)
|
| - instant_tab_->SetMarginSize(start_margin_, end_margin_);
|
| + instant_tab_->SetLocationBarMarginAndWidth(margin, width);
|
| }
|
|
|
| void InstantController::HandleAutocompleteResults(
|
| @@ -964,7 +965,8 @@ void InstantController::InstantLoaderRenderViewCreated() {
|
| loader_->SetDisplayInstantResults(instant_enabled_);
|
| loader_->SearchModeChanged(search_mode_);
|
| loader_->KeyCaptureChanged(omnibox_focus_state_ == OMNIBOX_FOCUS_INVISIBLE);
|
| - loader_->SetMarginSize(start_margin_, end_margin_);
|
| + loader_->SetLocationBarMarginAndWidth(location_bar_margin_,
|
| + location_bar_width_);
|
| loader_->InitializeFonts();
|
| }
|
|
|
| @@ -1094,7 +1096,8 @@ void InstantController::ResetInstantTab() {
|
| instant_tab_.reset(new InstantTab(this, active_tab));
|
| instant_tab_->Init();
|
| instant_tab_->SetDisplayInstantResults(instant_enabled_);
|
| - instant_tab_->SetMarginSize(start_margin_, end_margin_);
|
| + instant_tab_->SetLocationBarMarginAndWidth(location_bar_margin_,
|
| + location_bar_width_);
|
| instant_tab_->InitializeFonts();
|
| }
|
|
|
|
|