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

Side by Side Diff: chrome/browser/browser.cc

Issue 2856009: Fixes regression in opening a new tab where we would open it at the (Closed)
Patch Set: Created 10 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/browser.h" 5 #include "chrome/browser/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 3660 matching lines...) Expand 10 before | Expand all | Expand 10 after
3671 // carpet-bombing here. 3671 // carpet-bombing here.
3672 PageTransition::Type baseTransitionType = 3672 PageTransition::Type baseTransitionType =
3673 PageTransition::StripQualifier(transition); 3673 PageTransition::StripQualifier(transition);
3674 if ((baseTransitionType == PageTransition::TYPED || 3674 if ((baseTransitionType == PageTransition::TYPED ||
3675 baseTransitionType == PageTransition::AUTO_BOOKMARK) && 3675 baseTransitionType == PageTransition::AUTO_BOOKMARK) &&
3676 current_tab != NULL) { 3676 current_tab != NULL) {
3677 RenderViewHostDelegate::BrowserIntegration* delegate = current_tab; 3677 RenderViewHostDelegate::BrowserIntegration* delegate = current_tab;
3678 delegate->OnUserGesture(); 3678 delegate->OnUserGesture();
3679 } 3679 }
3680 3680
3681 transition = AdjustWindowOpenDispositionForTab( 3681 disposition = AdjustWindowOpenDispositionForTab(
3682 current_tab && IsPinned(current_tab), 3682 current_tab && IsPinned(current_tab),
3683 url, 3683 url,
3684 referrer, 3684 referrer,
3685 transition, 3685 transition,
3686 disposition); 3686 disposition);
3687 3687
3688 if (HandleCrossAppNavigation(current_tab, url, referrer, &disposition, 3688 if (HandleCrossAppNavigation(current_tab, url, referrer, &disposition,
3689 transition)) { 3689 transition)) {
3690 // If the source tab was brand new, we can be left with an empty tab which 3690 // If the source tab was brand new, we can be left with an empty tab which
3691 // looks ugly. Close it. It is still kinda ugly to have a tab flash visible 3691 // looks ugly. Close it. It is still kinda ugly to have a tab flash visible
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
3939 } 3939 }
3940 3940
3941 bool Browser::IsPinned(TabContents* source) { 3941 bool Browser::IsPinned(TabContents* source) {
3942 int index = tabstrip_model_.GetIndexOfTabContents(source); 3942 int index = tabstrip_model_.GetIndexOfTabContents(source);
3943 if (index == TabStripModel::kNoTab) { 3943 if (index == TabStripModel::kNoTab) {
3944 NOTREACHED() << "IsPinned called for tab not in our strip"; 3944 NOTREACHED() << "IsPinned called for tab not in our strip";
3945 return false; 3945 return false;
3946 } 3946 }
3947 return tabstrip_model_.IsTabPinned(index); 3947 return tabstrip_model_.IsTabPinned(index);
3948 } 3948 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698