| Index: ash/wm/screen_dimmer.cc
|
| diff --git a/ash/wm/screen_dimmer.cc b/ash/wm/screen_dimmer.cc
|
| index c0bb3d84129f196706530b791342349b78474b88..7e002e52e7277b668d42c3a70cf8e35c5c19b226 100644
|
| --- a/ash/wm/screen_dimmer.cc
|
| +++ b/ash/wm/screen_dimmer.cc
|
| @@ -4,9 +4,10 @@
|
|
|
| #include "ash/wm/screen_dimmer.h"
|
|
|
| +#include "ash/aura/wm_window_aura.h"
|
| +#include "ash/common/wm/window_dimmer.h"
|
| #include "ash/common/wm_shell.h"
|
| #include "ash/shell.h"
|
| -#include "ash/wm/dim_window.h"
|
| #include "base/time/time.h"
|
| #include "ui/aura/window_event_dispatcher.h"
|
| #include "ui/aura/window_property.h"
|
| @@ -91,22 +92,19 @@ void ScreenDimmer::OnRootWindowAdded(WmWindow* root_window) {
|
|
|
| void ScreenDimmer::Update(bool should_dim) {
|
| for (aura::Window* container : GetAllContainers(container_id_)) {
|
| - DimWindow* dim = DimWindow::Get(container);
|
| + WindowDimmer* dim = WindowDimmer::Get(WmWindowAura::Get(container));
|
| if (should_dim) {
|
| if (!dim) {
|
| - dim = new DimWindow(container);
|
| + dim = new WindowDimmer(WmWindowAura::Get(container));
|
| dim->SetDimOpacity(target_opacity_);
|
| }
|
| if (at_bottom_)
|
| - dim->parent()->StackChildAtBottom(dim);
|
| + dim->parent()->StackChildAtBottom(dim->window());
|
| else
|
| - dim->parent()->StackChildAtTop(dim);
|
| - dim->Show();
|
| - } else {
|
| - if (dim) {
|
| - dim->Hide();
|
| - delete dim;
|
| - }
|
| + dim->parent()->StackChildAtTop(dim->window());
|
| + dim->window()->Show();
|
| + } else if (dim) {
|
| + dim->Destroy();
|
| }
|
| }
|
| }
|
|
|