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 17 matching lines...) Expand all Loading... |
28 gfx::NativeView parent) { | 28 gfx::NativeView parent) { |
29 views::Widget* widget = new views::Widget; | 29 views::Widget* widget = new views::Widget; |
30 views::Widget::InitParams params; | 30 views::Widget::InitParams params; |
31 params.delegate = dialog; | 31 params.delegate = dialog; |
32 if (!dialog || dialog->UseNewStyleForThisDialog()) { | 32 if (!dialog || dialog->UseNewStyleForThisDialog()) { |
33 params.opacity = Widget::InitParams::TRANSLUCENT_WINDOW; | 33 params.opacity = Widget::InitParams::TRANSLUCENT_WINDOW; |
34 params.remove_standard_frame = true; | 34 params.remove_standard_frame = true; |
35 } | 35 } |
36 params.context = context; | 36 params.context = context; |
37 params.parent = parent; | 37 params.parent = parent; |
38 params.top_level = true; | |
39 // TODO(msw): Add a matching shadow type and remove the bubble frame border? | 38 // TODO(msw): Add a matching shadow type and remove the bubble frame border? |
40 params.shadow_type = views::Widget::InitParams::SHADOW_TYPE_NONE; | 39 params.shadow_type = views::Widget::InitParams::SHADOW_TYPE_NONE; |
41 widget->Init(params); | 40 widget->Init(params); |
42 return widget; | 41 return widget; |
43 } | 42 } |
44 | 43 |
45 View* DialogDelegate::CreateExtraView() { | 44 View* DialogDelegate::CreateExtraView() { |
46 return NULL; | 45 return NULL; |
47 } | 46 } |
48 | 47 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 | 201 |
203 const Widget* DialogDelegateView::GetWidget() const { | 202 const Widget* DialogDelegateView::GetWidget() const { |
204 return View::GetWidget(); | 203 return View::GetWidget(); |
205 } | 204 } |
206 | 205 |
207 View* DialogDelegateView::GetContentsView() { | 206 View* DialogDelegateView::GetContentsView() { |
208 return this; | 207 return this; |
209 } | 208 } |
210 | 209 |
211 } // namespace views | 210 } // namespace views |
OLD | NEW |