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

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

Issue 6028010: Fixes bug in handling of openning background tabs by way of clicking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nuke IsPopupOpen. Created 9 years, 12 months 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/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
« no previous file with comments | « chrome/browser/gtk/location_bar_view_gtk.cc ('k') | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698