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

Side by Side Diff: ash/wm/screen_pinning_controller.cc

Issue 2237433002: ash: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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 | « ash/utility/screenshot_controller.cc ('k') | ash/wm/system_modal_container_layout_manager.cc » ('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 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
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
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
OLDNEW
« no previous file with comments | « ash/utility/screenshot_controller.cc ('k') | ash/wm/system_modal_container_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698