diff options
author | flackr@chromium.org <flackr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-19 16:10:51 +0000 |
---|---|---|
committer | flackr@chromium.org <flackr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-19 16:10:51 +0000 |
commit | c5e22aee57bd524acf0fb620192a05cdcfc4c1ab (patch) | |
tree | 860c7d622ab4ca210a17539235863112feea5adf /chrome/browser/ui/browser_dialogs.h | |
parent | 1da813714de79af80d4790b7797ea6788822c9be (diff) | |
download | chromium_src-c5e22aee57bd524acf0fb620192a05cdcfc4c1ab.zip chromium_src-c5e22aee57bd524acf0fb620192a05cdcfc4c1ab.tar.gz chromium_src-c5e22aee57bd524acf0fb620192a05cdcfc4c1ab.tar.bz2 |
Close created HtmlDialogs on closing of the browser that opened them.
BUG=103595
TEST=Open a dialog from a new browser (test incognito browser too), and close that browser. The dialog should close avoiding the use of the invalid profile.
Review URL: http://codereview.chromium.org/9051004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118301 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/browser_dialogs.h')
-rw-r--r-- | chrome/browser/ui/browser_dialogs.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/ui/browser_dialogs.h b/chrome/browser/ui/browser_dialogs.h index e395ad1..970f272 100644 --- a/chrome/browser/ui/browser_dialogs.h +++ b/chrome/browser/ui/browser_dialogs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -36,12 +36,16 @@ void ShowAboutIPCDialog(); #endif // IPC_MESSAGE_LOG_ENABLED // Creates and shows an HTML dialog with the given delegate and profile. -// The window is automatically destroyed when it is closed. +// The window is automatically destroyed when it is closed. |browser| can be +// NULL if the profile used is not incognito, otherwise the window will be +// closed if the browser is closed. // Returns the created window. // // Make sure to use the returned window only when you know it is safe // to do so, i.e. before OnDialogClosed() is called on the delegate. -gfx::NativeWindow ShowHtmlDialog(gfx::NativeWindow parent, Profile* profile, +gfx::NativeWindow ShowHtmlDialog(gfx::NativeWindow parent, + Profile* profile, + Browser* browser, HtmlDialogUIDelegate* delegate, DialogStyle style); |