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

Unified Diff: ui/views/window/dialog_delegate.cc

Issue 14742002: Render opaque border with no shadow for web contents modal dialogs under Views/Win32 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ChromeOS build failure Created 7 years, 7 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
« no previous file with comments | « ui/views/window/dialog_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/dialog_delegate.cc
diff --git a/ui/views/window/dialog_delegate.cc b/ui/views/window/dialog_delegate.cc
index a6f2732c388135ed834a6f388f69402992857f01..e1272d1e81358e4d8e93cbacfb0172963f43abb1 100644
--- a/ui/views/window/dialog_delegate.cc
+++ b/ui/views/window/dialog_delegate.cc
@@ -152,11 +152,25 @@ NonClientFrameView* DialogDelegate::CreateNonClientFrameView(Widget* widget) {
// static
NonClientFrameView* DialogDelegate::CreateNewStyleFrameView(Widget* widget) {
+ return CreateNewStyleFrameView(widget, false);
+}
+
+NonClientFrameView* DialogDelegate::CreateNewStyleFrameView(
+ Widget* widget,
+ bool force_opaque_border) {
BubbleFrameView* frame = new BubbleFrameView(gfx::Insets());
const SkColor color = widget->GetNativeTheme()->GetSystemColor(
ui::NativeTheme::kColorId_DialogBackground);
- frame->SetBubbleBorder(
- new BubbleBorder(BubbleBorder::FLOAT, BubbleBorder::SMALL_SHADOW, color));
+ if (force_opaque_border) {
+ frame->SetBubbleBorder(new BubbleBorder(
+ BubbleBorder::NONE,
+ BubbleBorder::NO_SHADOW_OPAQUE_BORDER,
+ color));
+ } else {
+ frame->SetBubbleBorder(new BubbleBorder(BubbleBorder::FLOAT,
+ BubbleBorder::SMALL_SHADOW,
+ color));
+ }
frame->SetTitle(widget->widget_delegate()->GetWindowTitle());
DialogDelegate* delegate = widget->widget_delegate()->AsDialogDelegate();
if (delegate) {
@@ -166,6 +180,8 @@ NonClientFrameView* DialogDelegate::CreateNewStyleFrameView(Widget* widget) {
}
frame->SetShowCloseButton(true);
frame->set_can_drag(true);
+ if (force_opaque_border)
+ widget->set_frame_type(views::Widget::FRAME_TYPE_FORCE_CUSTOM);
return frame;
}
« no previous file with comments | « ui/views/window/dialog_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698