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

Unified Diff: chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm

Issue 17500003: Close web contents modal dialogs on content load start (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compilation fixes, change "inhibit" variable names Created 7 years, 5 months 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
Index: chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
index df302dfc573a304edc28ad3654dce2d31280323b..49d753fc46578d4e18456c1c840ca1c004dc37e2 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
@@ -78,6 +78,14 @@ NativeWebContentsModalDialog ConstrainedWindowMac::GetNativeDialog() {
return this;
}
+void ConstrainedWindowMac::SetPreventCloseOnLoadStart(bool prevent) {
+ WebContentsModalDialogManager* web_contents_modal_dialog_manager =
+ WebContentsModalDialogManager::FromWebContents(web_contents_);
+ web_contents_modal_dialog_manager->SetPreventCloseOnLoadStart(
+ GetNativeDialog(),
+ prevent);
+}
+
NSWindow* ConstrainedWindowMac::GetParentWindow() const {
// Tab contents in a tabbed browser may not be inside a window. For this
// reason use a browser window if possible.

Powered by Google App Engine
This is Rietveld 408576698