Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index aa3b271c9af171c6f914018baf7b736a5a6d4db5..89074e267b07be6fe3e26025320a4c57d9adec88 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -4162,14 +4162,18 @@ TabContentsWrapper* Browser::TabContentsFactory( |
} |
bool Browser::OpenInstant(WindowOpenDisposition disposition) { |
- if (!instant() || !instant()->is_active() || !instant()->IsCurrent()) |
+ if (!instant() || !instant()->is_active() || !instant()->IsCurrent() || |
+ disposition == NEW_BACKGROUND_TAB) { |
+ // NEW_BACKGROUND_TAB results in leaving the omnibox open, so we don't |
+ // attempt to use the instant preview. |
return false; |
+ } |
if (disposition == CURRENT_TAB) { |
instant()->CommitCurrentPreview(INSTANT_COMMIT_PRESSED_ENTER); |
return true; |
} |
- if (disposition == NEW_FOREGROUND_TAB || disposition == NEW_BACKGROUND_TAB) { |
+ if (disposition == NEW_FOREGROUND_TAB) { |
TabContentsWrapper* preview_contents = instant()->ReleasePreviewContents( |
INSTANT_COMMIT_PRESSED_ENTER); |
// HideInstant is invoked after release so that InstantController is not |