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

Unified Diff: chrome/browser/browser.cc

Issue 2807016: Make pinned tabs a little stickier. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: review comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/browser_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser.cc
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 0935c25e94fb89875a2b87df9f68527175ff68f1..81e4b73ac696946c27e93c51b0ba213f2b5a506e 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -1233,6 +1233,17 @@ void Browser::OpenCurrentURL() {
CloseTabContents(selected_contents);
return;
}
+
+ if (selected_contents) {
+ // For the purposes of changing the window open disposition, the referrer
+ // is the current tab's URL.
+ open_disposition = AdjustWindowOpenDispositionForTab(
+ IsPinned(selected_contents),
+ url,
+ selected_contents->GetURL(),
+ location_bar->GetPageTransition(),
+ open_disposition);
+ }
}
OpenURLAtIndex(NULL, url, GURL(),
@@ -3635,7 +3646,8 @@ WindowOpenDisposition Browser::AdjustWindowOpenDispositionForTab(
if (!is_pinned ||
original_disposition != CURRENT_TAB ||
(transition != PageTransition::AUTO_BOOKMARK &&
- transition != PageTransition::LINK)) {
+ transition != PageTransition::LINK &&
+ transition != PageTransition::TYPED)) {
return original_disposition;
}
« no previous file with comments | « no previous file | chrome/browser/browser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698