OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/views/window/dialog_delegate.h" | 5 #include "ui/views/window/dialog_delegate.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "grit/ui_strings.h" | 8 #include "grit/ui_strings.h" |
9 #include "ui/base/l10n/l10n_util.h" | 9 #include "ui/base/l10n/l10n_util.h" |
10 #include "ui/views/bubble/bubble_border.h" | 10 #include "ui/views/bubble/bubble_border.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 Widget* DialogDelegate::CreateDialogWidget(DialogDelegate* dialog, | 30 Widget* DialogDelegate::CreateDialogWidget(DialogDelegate* dialog, |
31 gfx::NativeWindow context, | 31 gfx::NativeWindow context, |
32 gfx::NativeWindow parent) { | 32 gfx::NativeWindow parent) { |
33 views::Widget* widget = new views::Widget; | 33 views::Widget* widget = new views::Widget; |
34 views::Widget::InitParams params; | 34 views::Widget::InitParams params; |
35 params.delegate = dialog; | 35 params.delegate = dialog; |
36 if (!dialog || dialog->UseNewStyleForThisDialog()) { | 36 if (!dialog || dialog->UseNewStyleForThisDialog()) { |
37 params.opacity = Widget::InitParams::TRANSLUCENT_WINDOW; | 37 params.opacity = Widget::InitParams::TRANSLUCENT_WINDOW; |
38 params.remove_standard_frame = true; | 38 params.remove_standard_frame = true; |
39 } | 39 } |
| 40 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 41 // Dialogs on Linux always have custom frames. |
| 42 params.remove_standard_frame = true; |
| 43 #endif |
40 params.context = context; | 44 params.context = context; |
41 params.parent = parent; | 45 params.parent = parent; |
42 params.top_level = true; | 46 params.top_level = true; |
43 widget->Init(params); | 47 widget->Init(params); |
44 return widget; | 48 return widget; |
45 } | 49 } |
46 | 50 |
47 View* DialogDelegate::CreateExtraView() { | 51 View* DialogDelegate::CreateExtraView() { |
48 return NULL; | 52 return NULL; |
49 } | 53 } |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 229 |
226 const Widget* DialogDelegateView::GetWidget() const { | 230 const Widget* DialogDelegateView::GetWidget() const { |
227 return View::GetWidget(); | 231 return View::GetWidget(); |
228 } | 232 } |
229 | 233 |
230 View* DialogDelegateView::GetContentsView() { | 234 View* DialogDelegateView::GetContentsView() { |
231 return this; | 235 return this; |
232 } | 236 } |
233 | 237 |
234 } // namespace views | 238 } // namespace views |
OLD | NEW |