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

Unified Diff: ash/root_window_controller.cc

Issue 2876993002: Introduce window container to be used by lock screen app windows (Closed)
Patch Set: . Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index ab4e14c00d7ca1c3c2591422ea3786d594bc8733..6a1e1b8d51bc788db649a874b606436376cc6b92 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -40,6 +40,7 @@
#include "ash/wm/boot_splash_screen_chromeos.h"
#include "ash/wm/container_finder.h"
#include "ash/wm/fullscreen_window_finder.h"
+#include "ash/wm/lock_action_handler_layout_manager.h"
#include "ash/wm/lock_layout_manager.h"
#include "ash/wm/panels/attached_panel_window_targeter.h"
#include "ash/wm/panels/panel_layout_manager.h"
@@ -208,6 +209,8 @@ void ReparentAllWindows(aura::Window* src, aura::Window* dst) {
kShellWindowId_LockSystemModalContainer,
kShellWindowId_UnparentedControlContainer,
kShellWindowId_OverlayContainer,
+ kShellWindowId_LockActionHandlerContainer,
+ kShellWindowId_LockActionHandlerContainer_Background,
};
const int kExtraContainerIdsToMoveInUnifiedMode[] = {
kShellWindowId_LockScreenContainer,
@@ -809,6 +812,20 @@ void RootWindowController::InitLayoutManagers() {
lock_modal_container->SetLayoutManager(
new SystemModalContainerLayoutManager(lock_modal_container));
+ aura::Window* lock_action_handler_container =
+ GetContainer(kShellWindowId_LockActionHandlerContainer);
+ DCHECK(lock_action_handler_container);
+ lock_action_handler_container->SetLayoutManager(
+ new LockActionHandlerLayoutManager(lock_action_handler_container,
+ wm_shelf_.get()));
+
+ aura::Window* lock_action_handler_container_background =
+ GetContainer(kShellWindowId_LockActionHandlerContainer_Background);
+ DCHECK(lock_action_handler_container_background);
+ lock_action_handler_container_background->SetLayoutManager(
+ new LockActionHandlerLayoutManager(
+ lock_action_handler_container_background, wm_shelf_.get()));
+
aura::Window* lock_container =
GetContainer(kShellWindowId_LockScreenContainer);
DCHECK(lock_container);
@@ -957,6 +974,17 @@ void RootWindowController::CreateContainers() {
WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES);
modal_container->SetChildrenUseExtendedHitRegion();
+ WmWindow* lock_action_handler_container_background = CreateContainer(
+ kShellWindowId_LockActionHandlerContainer_Background,
+ "LockActionHandlerContainer_Background", lock_screen_containers);
+ lock_action_handler_container_background
+ ->SetSnapsChildrenToPhysicalPixelBoundary();
+ lock_action_handler_container_background
+ ->SetChildWindowVisibilityChangesAnimated();
+ lock_action_handler_container_background
+ ->SetBoundsInScreenBehaviorForChildren(
+ WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES);
+
// TODO(beng): Figure out if we can make this use
// SystemModalContainerEventFilter instead of stops_event_propagation.
WmWindow* lock_container =
@@ -967,6 +995,14 @@ void RootWindowController::CreateContainers() {
WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES);
// TODO(beng): stopsevents
+ WmWindow* lock_action_handler_container =
+ CreateContainer(kShellWindowId_LockActionHandlerContainer,
+ "LockActionHandlerContainer", lock_screen_containers);
+ lock_action_handler_container->SetSnapsChildrenToPhysicalPixelBoundary();
+ lock_action_handler_container->SetChildWindowVisibilityChangesAnimated();
+ lock_action_handler_container->SetBoundsInScreenBehaviorForChildren(
+ WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES);
+
WmWindow* lock_modal_container =
CreateContainer(kShellWindowId_LockSystemModalContainer,
"LockSystemModalContainer", lock_screen_containers);

Powered by Google App Engine
This is Rietveld 408576698