| 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 63fd0727c62a35d411a892336211983146bcdccf..9c2c1b0f8a93f313059fefc14ad323b641308f51 100644
|
| --- a/ui/views/widget/native_widget_aura.cc
|
| +++ b/ui/views/widget/native_widget_aura.cc
|
| @@ -130,6 +130,18 @@ void NativeWidgetAura::AssignIconToAuraWindow(aura::Window* window,
|
| }
|
| }
|
|
|
| +// static
|
| +void NativeWidgetAura::SetShadowElevationFromInitParams(
|
| + aura::Window* window,
|
| + const Widget::InitParams& params) {
|
| + if (params.shadow_type == Widget::InitParams::SHADOW_TYPE_NONE) {
|
| + SetShadowElevation(window, wm::ShadowElevation::NONE);
|
| + } else if (params.shadow_type == Widget::InitParams::SHADOW_TYPE_DROP &&
|
| + params.shadow_elevation) {
|
| + SetShadowElevation(window, *params.shadow_elevation);
|
| + }
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // NativeWidgetAura, internal::NativeWidgetPrivate implementation:
|
|
|
| @@ -152,12 +164,7 @@ 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) {
|
| - SetShadowElevation(window_, wm::ShadowElevation::NONE);
|
| - } else if (params.shadow_type == Widget::InitParams::SHADOW_TYPE_DROP &&
|
| - params.shadow_elevation) {
|
| - SetShadowElevation(window_, *params.shadow_elevation);
|
| - }
|
| + SetShadowElevationFromInitParams(window_, params);
|
| if (params.type == Widget::InitParams::TYPE_CONTROL)
|
| window_->Show();
|
|
|
|
|