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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/widget/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 RegisterNativeWidgetForWindow(this, window_); 136 RegisterNativeWidgetForWindow(this, window_);
137 window_->SetType(GetAuraWindowTypeForWidgetType(params.type)); 137 window_->SetType(GetAuraWindowTypeForWidgetType(params.type));
138 window_->SetProperty(aura::client::kShowStateKey, params.show_state); 138 window_->SetProperty(aura::client::kShowStateKey, params.show_state);
139 if (params.type == Widget::InitParams::TYPE_BUBBLE) 139 if (params.type == Widget::InitParams::TYPE_BUBBLE)
140 aura::client::SetHideOnDeactivate(window_, true); 140 aura::client::SetHideOnDeactivate(window_, true);
141 window_->SetTransparent( 141 window_->SetTransparent(
142 params.opacity == Widget::InitParams::TRANSLUCENT_WINDOW); 142 params.opacity == Widget::InitParams::TRANSLUCENT_WINDOW);
143 window_->Init(params.layer_type); 143 window_->Init(params.layer_type);
144 // Set name after layer init so it propagates to layer. 144 // Set name after layer init so it propagates to layer.
145 window_->SetName(params.name); 145 window_->SetName(params.name);
146 if (params.shadow_type == Widget::InitParams::SHADOW_TYPE_NONE) 146 if (params.shadow_type == Widget::InitParams::SHADOW_TYPE_NONE) {
147 SetShadowType(window_, wm::SHADOW_TYPE_NONE); 147 SetShadowElevation(window_, wm::ShadowElevation::NONE);
148 else if (params.shadow_type == Widget::InitParams::SHADOW_TYPE_DROP) 148 } else if (params.shadow_type == Widget::InitParams::SHADOW_TYPE_DROP &&
149 SetShadowType(window_, wm::SHADOW_TYPE_RECTANGULAR); 149 params.shadow_elevation) {
150 SetShadowElevation(window_, *params.shadow_elevation);
151 }
150 if (params.type == Widget::InitParams::TYPE_CONTROL) 152 if (params.type == Widget::InitParams::TYPE_CONTROL)
151 window_->Show(); 153 window_->Show();
152 154
153 delegate_->OnNativeWidgetCreated(false); 155 delegate_->OnNativeWidgetCreated(false);
154 156
155 gfx::Rect window_bounds = params.bounds; 157 gfx::Rect window_bounds = params.bounds;
156 gfx::NativeView parent = params.parent; 158 gfx::NativeView parent = params.parent;
157 gfx::NativeView context = params.context; 159 gfx::NativeView context = params.context;
158 if (!params.child) { 160 if (!params.child) {
159 // Set up the transient child before the window is added. This way the 161 // Set up the transient child before the window is added. This way the
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 gfx::NativeView native_view) { 1231 gfx::NativeView native_view) {
1230 aura::client::CaptureClient* capture_client = 1232 aura::client::CaptureClient* capture_client =
1231 aura::client::GetCaptureClient(native_view->GetRootWindow()); 1233 aura::client::GetCaptureClient(native_view->GetRootWindow());
1232 if (!capture_client) 1234 if (!capture_client)
1233 return nullptr; 1235 return nullptr;
1234 return capture_client->GetGlobalCaptureWindow(); 1236 return capture_client->GetGlobalCaptureWindow();
1235 } 1237 }
1236 1238
1237 } // namespace internal 1239 } // namespace internal
1238 } // namespace views 1240 } // namespace views
OLDNEW
« 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