| 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 | |
| 44 params.context = context; | 40 params.context = context; |
| 45 params.parent = parent; | 41 params.parent = parent; |
| 46 params.top_level = true; | 42 params.top_level = true; |
| 47 widget->Init(params); | 43 widget->Init(params); |
| 48 return widget; | 44 return widget; |
| 49 } | 45 } |
| 50 | 46 |
| 51 View* DialogDelegate::CreateExtraView() { | 47 View* DialogDelegate::CreateExtraView() { |
| 52 return NULL; | 48 return NULL; |
| 53 } | 49 } |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 225 |
| 230 const Widget* DialogDelegateView::GetWidget() const { | 226 const Widget* DialogDelegateView::GetWidget() const { |
| 231 return View::GetWidget(); | 227 return View::GetWidget(); |
| 232 } | 228 } |
| 233 | 229 |
| 234 View* DialogDelegateView::GetContentsView() { | 230 View* DialogDelegateView::GetContentsView() { |
| 235 return this; | 231 return this; |
| 236 } | 232 } |
| 237 | 233 |
| 238 } // namespace views | 234 } // namespace views |
| OLD | NEW |