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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/instant/instant_loader.h" 5 #include "chrome/browser/instant/instant_loader.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} 269 virtual void UpdateTargetURL(TabContents* source, const GURL& url) {}
270 virtual void ContentsMouseEvent( 270 virtual void ContentsMouseEvent(
271 TabContents* source, const gfx::Point& location, bool motion) {} 271 TabContents* source, const gfx::Point& location, bool motion) {}
272 virtual void ContentsZoomChange(bool zoom_in) {} 272 virtual void ContentsZoomChange(bool zoom_in) {}
273 virtual void OnContentSettingsChange(TabContents* source) {} 273 virtual void OnContentSettingsChange(TabContents* source) {}
274 virtual bool IsApplication() const { return false; } 274 virtual bool IsApplication() const { return false; }
275 virtual void ConvertContentsToApplication(TabContents* source) {} 275 virtual void ConvertContentsToApplication(TabContents* source) {}
276 virtual bool CanReloadContents(TabContents* source) const { return true; } 276 virtual bool CanReloadContents(TabContents* source) const { return true; }
277 virtual void ShowHtmlDialog(HtmlDialogUIDelegate* delegate, 277 virtual void ShowHtmlDialog(HtmlDialogUIDelegate* delegate,
278 gfx::NativeWindow parent_window) {} 278 gfx::NativeWindow parent_window) {}
279 virtual bool ShouldSuppressDialogs() {
280 // Any message shown during instant cancels instant, so we suppress them.
281 return true;
282 }
279 virtual void BeforeUnloadFired(TabContents* tab, 283 virtual void BeforeUnloadFired(TabContents* tab,
280 bool proceed, 284 bool proceed,
281 bool* proceed_to_fire_unload) {} 285 bool* proceed_to_fire_unload) {}
282 virtual void ForwardMessageToExternalHost(const std::string& message, 286 virtual void ForwardMessageToExternalHost(const std::string& message,
283 const std::string& origin, 287 const std::string& origin,
284 const std::string& target) {} 288 const std::string& target) {}
285 virtual bool IsExternalTabContainer() const { return false; } 289 virtual bool IsExternalTabContainer() const { return false; }
286 virtual void SetFocusToLocationBar(bool select_all) {} 290 virtual void SetFocusToLocationBar(bool select_all) {}
287 virtual bool ShouldFocusPageAfterCrash() { return false; } 291 virtual bool ShouldFocusPageAfterCrash() { return false; }
288 virtual void RenderWidgetShowing() {} 292 virtual void RenderWidgetShowing() {}
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 SetTakesFocusOnlyOnMouseDown(true); 782 SetTakesFocusOnlyOnMouseDown(true);
779 } 783 }
780 registrar_.Add( 784 registrar_.Add(
781 this, 785 this,
782 NotificationType::RENDER_VIEW_HOST_CHANGED, 786 NotificationType::RENDER_VIEW_HOST_CHANGED,
783 Source<NavigationController>(&preview_contents_->controller())); 787 Source<NavigationController>(&preview_contents_->controller()));
784 #endif 788 #endif
785 789
786 preview_contents_->tab_contents()->ShowContents(); 790 preview_contents_->tab_contents()->ShowContents();
787 } 791 }
OLDNEW
« 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