diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-06 18:11:50 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-06 18:11:50 +0000 |
commit | 8f55e8087439851d78245881a8acd62b24251801 (patch) | |
tree | 5647921d79785873857b41601b8861bbb6f31c53 /chrome/browser/instant | |
parent | 2c1a82846a04cb8277d4ddf514f9e0ff122da0d1 (diff) | |
download | chromium_src-8f55e8087439851d78245881a8acd62b24251801.zip chromium_src-8f55e8087439851d78245881a8acd62b24251801.tar.gz chromium_src-8f55e8087439851d78245881a8acd62b24251801.tar.bz2 |
Stops javascript alerts and unload dialogs from showing during
instant.
BUG=65206
TEST=see bug
Review URL: http://codereview.chromium.org/5631001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68354 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/instant')
-rw-r--r-- | chrome/browser/instant/instant_loader.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc index c3c62d2..af76f34 100644 --- a/chrome/browser/instant/instant_loader.cc +++ b/chrome/browser/instant/instant_loader.cc @@ -276,6 +276,10 @@ class InstantLoader::TabContentsDelegateImpl : public TabContentsDelegate { virtual bool CanReloadContents(TabContents* source) const { return true; } virtual void ShowHtmlDialog(HtmlDialogUIDelegate* delegate, gfx::NativeWindow parent_window) {} + virtual bool ShouldSuppressDialogs() { + // Any message shown during instant cancels instant, so we suppress them. + return true; + } virtual void BeforeUnloadFired(TabContents* tab, bool proceed, bool* proceed_to_fire_unload) {} |