| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ash/wm/screen_pinning_controller.h" | 5 #include "ash/wm/screen_pinning_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/aura/wm_window_aura.h" | 10 #include "ash/aura/wm_window_aura.h" |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 for (WmWindow* dim_window : std::vector<WmWindow*>(dim_windows_)) { | 348 for (WmWindow* dim_window : std::vector<WmWindow*>(dim_windows_)) { |
| 349 if (!dim_window->GetTargetVisibility()) | 349 if (!dim_window->GetTargetVisibility()) |
| 350 delete WmWindowAura::GetAuraWindow(dim_window); | 350 delete WmWindowAura::GetAuraWindow(dim_window); |
| 351 } | 351 } |
| 352 | 352 |
| 353 // Then, create missing dim_windows. | 353 // Then, create missing dim_windows. |
| 354 std::vector<WmWindow*> system_modal_containers = | 354 std::vector<WmWindow*> system_modal_containers = |
| 355 GetSystemModalWindowsExceptPinned(pinned_window_); | 355 GetSystemModalWindowsExceptPinned(pinned_window_); |
| 356 for (WmWindow* system_modal : system_modal_containers) { | 356 for (WmWindow* system_modal : system_modal_containers) { |
| 357 const std::vector<WmWindow*> children = system_modal->GetChildren(); | 357 const std::vector<WmWindow*> children = system_modal->GetChildren(); |
| 358 if (!children.empty() && ContainsValue(dim_windows_, children[0])) { | 358 if (!children.empty() && base::ContainsValue(dim_windows_, children[0])) { |
| 359 // The system modal dialog has the dim window. | 359 // The system modal dialog has the dim window. |
| 360 continue; | 360 continue; |
| 361 } | 361 } |
| 362 | 362 |
| 363 // This is the new system modal dialog. | 363 // This is the new system modal dialog. |
| 364 WmWindow* dim_window = CreateDimWindow(system_modal); | 364 WmWindow* dim_window = CreateDimWindow(system_modal); |
| 365 system_modal->StackChildAtBottom(dim_window); | 365 system_modal->StackChildAtBottom(dim_window); |
| 366 dim_windows_.push_back(dim_window); | 366 dim_windows_.push_back(dim_window); |
| 367 WmWindowAura::GetAuraWindow(dim_window) | 367 WmWindowAura::GetAuraWindow(dim_window) |
| 368 ->AddObserver(dim_window_observer_.get()); | 368 ->AddObserver(dim_window_observer_.get()); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 392 base::AutoReset<bool> auto_reset(&in_restacking_, true); | 392 base::AutoReset<bool> auto_reset(&in_restacking_, true); |
| 393 for (WmWindow* dim_window : dim_windows_) { | 393 for (WmWindow* dim_window : dim_windows_) { |
| 394 if (dim_window->GetParent() == container) { | 394 if (dim_window->GetParent() == container) { |
| 395 container->StackChildAtBottom(dim_window); | 395 container->StackChildAtBottom(dim_window); |
| 396 break; | 396 break; |
| 397 } | 397 } |
| 398 } | 398 } |
| 399 } | 399 } |
| 400 | 400 |
| 401 } // namespace ash | 401 } // namespace ash |
| OLD | NEW |