Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2388)

Unified Diff: ui/views/widget/native_widget_aura.cc

Issue 2596743002: Replace WM shadow types (on/off) and styles (small/inactive/active) (Closed)
Patch Set: one more mechanical change Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.cc ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3e8d62e7441b88a012ea79020baf0c70f8f35bad 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -143,10 +143,12 @@ 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);
+ } else if (params.shadow_type == Widget::InitParams::SHADOW_TYPE_DROP &&
+ params.shadow_elevation) {
+ SetShadowElevation(window_, *params.shadow_elevation);
+ }
if (params.type == Widget::InitParams::TYPE_CONTROL)
window_->Show();
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.cc ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698