Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index 44b531485ccb6ce4ef74d301c91670fc871b1e22..e725c6bc2b0e92e5d708ce07e92ef3720ec7b96e 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -2695,6 +2695,13 @@ void Browser::UpdateUIForNavigationInTab(TabContentsWrapper* contents, |
// navigating away from the new tab page. |
ScheduleUIUpdate(contents->web_contents(), content::INVALIDATE_TYPE_URL); |
+#if defined(USE_ASH) |
+ // When using ash it is not desirable to switch to a new window when the |
sky
2012/05/18 19:43:30
Why is this specific to ash? Additionally I'm not
Mr4D (OOO till 08-26)
2012/05/18 20:27:01
user_initiated:
the problem is that if the page r
|
+ // page refresh wasn't initiated by the user (but instead by a page refresh). |
+ if (!user_initiated) |
+ return; |
+#endif |
+ |
if (contents_is_selected) |
contents->web_contents()->Focus(); |
} |
@@ -3409,7 +3416,12 @@ WebContents* Browser::OpenURLFromTab(WebContents* source, |
nav_params.referrer = params.referrer; |
nav_params.disposition = params.disposition; |
nav_params.tabstrip_add_types = TabStripModel::ADD_NONE; |
- nav_params.window_action = browser::NavigateParams::SHOW_WINDOW; |
+#if defined(USE_ASH) |
sky
2012/05/18 19:43:30
Whats the motivation for this?
Mr4D (OOO till 08-26)
2012/05/18 20:27:01
When this flag gets set, the LoadURL call further
|
+ // If the current tab is initiating this, we don't want to update. |
+ if (nav_params.window_action != browser::NavigateParams::NO_ACTION || |
+ params.disposition != CURRENT_TAB) |
+#endif |
+ nav_params.window_action = browser::NavigateParams::SHOW_WINDOW; |
nav_params.user_gesture = true; |
nav_params.override_encoding = params.override_encoding; |
nav_params.is_renderer_initiated = params.is_renderer_initiated; |