Chromium Code Reviews| Index: ui/views/widget/native_widget_aura.cc |
| diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc |
| index 80be94f24d3eb643353ca43b68cb41440182b8d1..6beb47df94d7106d0d92fdd823fc5ac79635534a 100644 |
| --- a/ui/views/widget/native_widget_aura.cc |
| +++ b/ui/views/widget/native_widget_aura.cc |
| @@ -143,10 +143,13 @@ void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) { |
| window_->Init(params.layer_type); |
| // Set name after layer init so it propagates to layer. |
| window_->SetName(params.name); |
| - if (params.shadow_type == Widget::InitParams::SHADOW_TYPE_NONE) |
| - SetShadowType(window_, wm::SHADOW_TYPE_NONE); |
| - else if (params.shadow_type == Widget::InitParams::SHADOW_TYPE_DROP) |
| - SetShadowType(window_, wm::SHADOW_TYPE_RECTANGULAR); |
| + if (params.shadow_type == Widget::InitParams::SHADOW_TYPE_NONE) { |
| + SetShadowElevation(window_, wm::ShadowElevation::NONE); |
|
sky
2017/01/03 22:35:38
Isn't this the default?
Evan Stade
2017/01/04 00:20:45
The default depends on the platform and the type o
|
| + } else if (params.shadow_type == Widget::InitParams::SHADOW_TYPE_DROP && |
| + params.shadow_elevation >= 0) { |
| + SetShadowElevation( |
| + window_, static_cast<wm::ShadowElevation>(params.shadow_elevation)); |
| + } |
| if (params.type == Widget::InitParams::TYPE_CONTROL) |
| window_->Show(); |