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

Unified Diff: chrome/browser/instant/instant_loader.cc

Issue 5631001: Stops javascript alerts and unload dialogs from showing during (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move to single method Created 10 years 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/tab_contents/tab_contents.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_loader.cc
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc
index a4798a95803e93bc5a8476b4c998ce7b06a6665f..dc320a0d47c1d95f7ed1776e10f0518fd0b30483 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) {}
« no previous file with comments | « no previous file | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698