summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/options/options_window_view.cc
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-02 22:05:03 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-02 22:05:03 +0000
commit516650c2b70d0e2e14fcf0c284e22bc57ad53179 (patch)
tree93ca58e1ef54665509e57971d31e84ac80b4a1d3 /chrome/browser/chromeos/options/options_window_view.cc
parentff309b3ff56471cf49b9a95378078ed37437192f (diff)
downloadchromium_src-516650c2b70d0e2e14fcf0c284e22bc57ad53179.zip
chromium_src-516650c2b70d0e2e14fcf0c284e22bc57ad53179.tar.gz
chromium_src-516650c2b70d0e2e14fcf0c284e22bc57ad53179.tar.bz2
Update dialog parent handling logic.
- Use real transient parent for hosted native dialogs since window manager supports transient of transient now; - Use last active normal browser window as parent for option dialogs since we don't want to use panel popups as parent; BUG=chromium-os:3708 TEST=none. This CL gives real transent parent for dialogs but we still need to way to show the dialogs, either exit fullscreen or put them on top of fullscreen. Review URL: http://codereview.chromium.org/2501001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48773 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/options/options_window_view.cc')
-rw-r--r--chrome/browser/chromeos/options/options_window_view.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/chromeos/options/options_window_view.cc b/chrome/browser/chromeos/options/options_window_view.cc
index c072787..d284ce3 100644
--- a/chrome/browser/chromeos/options/options_window_view.cc
+++ b/chrome/browser/chromeos/options/options_window_view.cc
@@ -307,8 +307,16 @@ void CloseOptionsWindow() {
}
gfx::NativeWindow GetOptionsViewParent() {
- if (Browser* b = BrowserList::GetLastActive())
- return b->window()->GetNativeHandle();
+ if (Browser* b = BrowserList::GetLastActive()) {
+ if (b->type() != Browser::TYPE_NORMAL) {
+ b = BrowserList::FindBrowserWithType(b->profile(),
+ Browser::TYPE_NORMAL,
+ true);
+ }
+
+ if (b)
+ return b->window()->GetNativeHandle();
+ }
return NULL;
}