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

Side by Side Diff: ash/root_window_controller.cc

Issue 2320273002: Refactors DimWindow and moves to ash/common (Closed)
Patch Set: feedback and member initializer ordering Created 4 years, 3 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/mus/bridge/wm_window_mus.cc ('k') | ash/wm/dim_window.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 "ash/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/aura/aura_layout_manager_adapter.h" 10 #include "ash/aura/aura_layout_manager_adapter.h"
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 GetContainer(kShellWindowId_LockScreenContainersContainer); 387 GetContainer(kShellWindowId_LockScreenContainersContainer);
388 modal_container_id = kShellWindowId_LockSystemModalContainer; 388 modal_container_id = kShellWindowId_LockSystemModalContainer;
389 } else { 389 } else {
390 modal_container_id = kShellWindowId_SystemModalContainer; 390 modal_container_id = kShellWindowId_SystemModalContainer;
391 } 391 }
392 aura::Window* modal_container = GetContainer(modal_container_id); 392 aura::Window* modal_container = GetContainer(modal_container_id);
393 SystemModalContainerLayoutManager* modal_layout_manager = nullptr; 393 SystemModalContainerLayoutManager* modal_layout_manager = nullptr;
394 modal_layout_manager = static_cast<SystemModalContainerLayoutManager*>( 394 modal_layout_manager = static_cast<SystemModalContainerLayoutManager*>(
395 modal_container->layout_manager()); 395 modal_container->layout_manager());
396 396
397 if (modal_layout_manager->has_modal_background()) 397 if (modal_layout_manager->has_window_dimmer())
398 blocking_container = modal_container; 398 blocking_container = modal_container;
399 else 399 else
400 modal_container = nullptr; // Don't check modal dialogs. 400 modal_container = nullptr; // Don't check modal dialogs.
401 401
402 // In normal session. 402 // In normal session.
403 if (!blocking_container) 403 if (!blocking_container)
404 return true; 404 return true;
405 405
406 if (!IsWindowAboveContainer(window, blocking_container)) 406 if (!IsWindowAboveContainer(window, blocking_container))
407 return false; 407 return false;
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 shell->InitRootWindow(root_window); 726 shell->InitRootWindow(root_window);
727 727
728 wm_root_window_controller_->CreateContainers(); 728 wm_root_window_controller_->CreateContainers();
729 729
730 CreateSystemWallpaper(first_run_after_boot); 730 CreateSystemWallpaper(first_run_after_boot);
731 731
732 InitLayoutManagers(); 732 InitLayoutManagers();
733 InitTouchHuds(); 733 InitTouchHuds();
734 734
735 if (Shell::GetPrimaryRootWindowController() 735 if (Shell::GetPrimaryRootWindowController()
736 ->GetSystemModalLayoutManager(NULL) 736 ->GetSystemModalLayoutManager(nullptr)
737 ->has_modal_background()) { 737 ->has_window_dimmer()) {
738 GetSystemModalLayoutManager(NULL)->CreateModalBackground(); 738 GetSystemModalLayoutManager(nullptr)->CreateModalBackground();
739 } 739 }
740 740
741 WmShell::Get()->AddShellObserver(this); 741 WmShell::Get()->AddShellObserver(this);
742 742
743 wm_root_window_controller_->root_window_layout_manager()->OnWindowResized(); 743 wm_root_window_controller_->root_window_layout_manager()->OnWindowResized();
744 if (root_window_type == PRIMARY) { 744 if (root_window_type == PRIMARY) {
745 shell->InitKeyboard(); 745 shell->InitKeyboard();
746 } else { 746 } else {
747 ash_host_->AsWindowTreeHost()->Show(); 747 ash_host_->AsWindowTreeHost()->Show();
748 748
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 aura::Window* primary_root_window = Shell::GetInstance() 920 aura::Window* primary_root_window = Shell::GetInstance()
921 ->window_tree_host_manager() 921 ->window_tree_host_manager()
922 ->GetPrimaryRootWindow(); 922 ->GetPrimaryRootWindow();
923 return GetRootWindowSettings(primary_root_window)->controller; 923 return GetRootWindowSettings(primary_root_window)->controller;
924 } 924 }
925 925
926 return GetRootWindowSettings(root_window)->controller; 926 return GetRootWindowSettings(root_window)->controller;
927 } 927 }
928 928
929 } // namespace ash 929 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/wm_window_mus.cc ('k') | ash/wm/dim_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698