summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/browser.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index c5608a8..e3f6fefc 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -3069,6 +3069,16 @@ void Browser::OpenURLAtIndex(TabContents* source,
bool source_tab_was_frontmost = (current_tab == GetSelectedTabContents());
TabContents* new_contents = NULL;
+ // Opening a bookmark counts as a user gesture, so we don't need to avoid
+ // carpet-bombing here.
+ PageTransition::Type baseTransitionType =
+ PageTransition::StripQualifier(transition);
+ if (baseTransitionType == PageTransition::TYPED ||
+ baseTransitionType == PageTransition::AUTO_BOOKMARK) {
+ RenderViewHostDelegate::BrowserIntegration* delegate = current_tab;
+ delegate->OnUserGesture();
+ }
+
// If the URL is part of the same web site, then load it in the same
// SiteInstance (and thus the same process). This is an optimization to
// reduce process overhead; it is not necessary for compatibility. (That is,