summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/ui/dialog_style.h12
-rw-r--r--chrome/browser/ui/views/html_dialog_view.cc2
-rw-r--r--chrome/browser/ui/views/hung_renderer_view.cc5
-rw-r--r--chrome/browser/ui/webui/task_manager/task_manager_dialog.cc9
4 files changed, 22 insertions, 6 deletions
diff --git a/chrome/browser/ui/dialog_style.h b/chrome/browser/ui/dialog_style.h
index fd9774e..acf9d7e 100644
--- a/chrome/browser/ui/dialog_style.h
+++ b/chrome/browser/ui/dialog_style.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.
@@ -18,19 +18,21 @@ enum DialogStyle {
// Deprecated, see BubbleWindow::Create().
// TODO(bshe): We probably need to use this style for certificate viewer
// HTML dialog.
- STYLE_XBAR = 1 << 0,
+ STYLE_XBAR = 1 << 0,
// Show throbber for slow rendering.
// Deprecated, see BubbleWindow::Create().
- STYLE_THROBBER = 1 << 1,
+ STYLE_THROBBER = 1 << 1,
// Content and title flush to edge, no padding.
- STYLE_FLUSH = 1 << 2,
+ STYLE_FLUSH = 1 << 2,
// Content flush to edge. Padding only on title.
- STYLE_FLUSH_CONTENT = 1 << 3
+ STYLE_FLUSH_CONTENT = 1 << 3,
+
#endif
+ STYLE_ALWAYS_ON_TOP = 1 << 4
};
#endif // CHROME_BROWSER_UI_DIALOG_STYLE_H_
diff --git a/chrome/browser/ui/views/html_dialog_view.cc b/chrome/browser/ui/views/html_dialog_view.cc
index 278ba03..c43fe9f 100644
--- a/chrome/browser/ui/views/html_dialog_view.cc
+++ b/chrome/browser/ui/views/html_dialog_view.cc
@@ -40,6 +40,8 @@ gfx::NativeWindow ShowHtmlDialog(gfx::NativeWindow parent,
HtmlDialogView* html_view = new HtmlDialogView(profile, browser, delegate);
views::Widget::CreateWindowWithParent(html_view, parent);
html_view->InitDialog();
+ if (style & STYLE_ALWAYS_ON_TOP)
+ html_view->GetWidget()->SetAlwaysOnTop(true);
html_view->GetWidget()->Show();
return html_view->GetWidget()->GetNativeWindow();
}
diff --git a/chrome/browser/ui/views/hung_renderer_view.cc b/chrome/browser/ui/views/hung_renderer_view.cc
index 594c5af..0ac7d2e 100644
--- a/chrome/browser/ui/views/hung_renderer_view.cc
+++ b/chrome/browser/ui/views/hung_renderer_view.cc
@@ -564,6 +564,11 @@ void HungRendererDialogView::InitClass() {
static HungRendererDialogView* CreateHungRendererDialogView() {
HungRendererDialogView* cv = new HungRendererDialogView;
views::Widget::CreateWindow(cv);
+#if defined(USE_ASH)
+ // Force the window to be always on top so that it can float above maximized
+ // windows.
+ cv->GetWidget()->SetAlwaysOnTop(true);
+#endif
return cv;
}
diff --git a/chrome/browser/ui/webui/task_manager/task_manager_dialog.cc b/chrome/browser/ui/webui/task_manager/task_manager_dialog.cc
index 2a085f9..415a26c 100644
--- a/chrome/browser/ui/webui/task_manager/task_manager_dialog.cc
+++ b/chrome/browser/ui/webui/task_manager/task_manager_dialog.cc
@@ -195,11 +195,18 @@ void TaskManagerDialogImpl::OnCloseDialog() {
void TaskManagerDialogImpl::OpenHtmlDialog() {
Browser* browser = BrowserList::GetLastActive();
DCHECK(browser);
+#if defined(USE_ASH)
+ // Force the window to be always on top so that it can float above maximized
+ // windows.
+ DialogStyle dialog_style = STYLE_ALWAYS_ON_TOP;
+#else
+ DialogStyle dialog_style = STYLE_GENERIC;
+#endif
window_ = browser::ShowHtmlDialog(NULL,
browser->profile()->GetOriginalProfile(),
NULL,
this,
- STYLE_GENERIC);
+ dialog_style);
}
// ****************************************************