From ddd28ae31cb3fbfc2a06fc0b9469e27712645434 Mon Sep 17 00:00:00 2001 From: "sreeram@chromium.org" Date: Mon, 4 Mar 2013 21:11:54 +0000 Subject: Instant: Rename 'preview' to 'overlay' This CL has only cosmetic changes. It's in service of a larger refactor. Also: + Renames InstantModel* to InstantOverlayModel* to make it clear that the model is meant only for the overlay, and not committed tabs that Instant works with. BUG=none R=sky@chromium.org TEST=none Review URL: https://chromiumcodereview.appspot.com/12381078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185971 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/ui/browser_instant_controller.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'chrome/browser/ui/browser_instant_controller.cc') diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc index 0b69d66..0eea71a 100644 --- a/chrome/browser/ui/browser_instant_controller.cc +++ b/chrome/browser/ui/browser_instant_controller.cc @@ -182,20 +182,20 @@ Profile* BrowserInstantController::profile() const { } void BrowserInstantController::CommitInstant( - scoped_ptr preview, + scoped_ptr overlay, bool in_new_tab) { - if (profile()->GetExtensionService()->IsInstalledApp(preview->GetURL())) { + if (profile()->GetExtensionService()->IsInstalledApp(overlay->GetURL())) { AppLauncherHandler::RecordAppLaunchType( extension_misc::APP_LAUNCH_OMNIBOX_INSTANT); } if (in_new_tab) { - // TabStripModel takes ownership of |preview|. - browser_->tab_strip_model()->AddWebContents(preview.release(), -1, + // TabStripModel takes ownership of |overlay|. + browser_->tab_strip_model()->AddWebContents(overlay.release(), -1, instant_.last_transition_type(), TabStripModel::ADD_ACTIVE); } else { ReplaceWebContentsAt( browser_->tab_strip_model()->active_index(), - preview.Pass()); + overlay.Pass()); } } @@ -224,9 +224,9 @@ gfx::Rect BrowserInstantController::GetInstantBounds() { return browser_->window()->GetInstantBounds(); } -void BrowserInstantController::InstantPreviewFocused() { +void BrowserInstantController::InstantOverlayFocused() { // NOTE: This is only invoked on aura. - browser_->window()->WebContentsFocused(instant_.GetPreviewContents()); + browser_->window()->WebContentsFocused(instant_.GetOverlayContents()); } void BrowserInstantController::FocusOmniboxInvisibly() { @@ -274,10 +274,10 @@ void BrowserInstantController::SetOmniboxBounds(const gfx::Rect& bounds) { void BrowserInstantController::ResetInstant() { bool instant_enabled = IsInstantEnabled(profile()); - bool use_local_preview_only = profile()->IsOffTheRecord() || + bool use_local_overlay_only = profile()->IsOffTheRecord() || (!instant_enabled && !profile()->GetPrefs()->GetBoolean(prefs::kSearchSuggestEnabled)); - instant_.SetInstantEnabled(instant_enabled, use_local_preview_only); + instant_.SetInstantEnabled(instant_enabled, use_local_overlay_only); } //////////////////////////////////////////////////////////////////////////////// @@ -285,7 +285,7 @@ void BrowserInstantController::ResetInstant() { void BrowserInstantController::ModeChanged(const search::Mode& old_mode, const search::Mode& new_mode) { - // If mode is now |NTP|, send theme-related information to instant. + // If mode is now |NTP|, send theme-related information to Instant. if (new_mode.is_ntp()) UpdateThemeInfo(false); -- cgit v1.1