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

Unified Diff: ash/root_window_controller.cc

Issue 2700523004: Remove docked windows entirely in M59. (Closed)
Patch Set: Rebase Created 3 years, 9 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
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/shell_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 9022c5f0815ce4a045957f0b3c1a64290e07bbb6..df24833159ca7d7e795b3753155a35ba8e7e23f5 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -27,7 +27,6 @@
#include "ash/common/wallpaper/wallpaper_widget_controller.h"
#include "ash/common/wm/always_on_top_controller.h"
#include "ash/common/wm/container_finder.h"
-#include "ash/common/wm/dock/docked_window_layout_manager.h"
#include "ash/common/wm/fullscreen_window_finder.h"
#include "ash/common/wm/lock_layout_manager.h"
#include "ash/common/wm/panels/panel_layout_manager.h"
@@ -171,11 +170,9 @@ void ReparentWindow(WmWindow* window, WmWindow* new_parent) {
// Update the restore bounds to make it relative to the display.
wm::WindowState* state = window->GetWindowState();
gfx::Rect restore_bounds;
- bool has_restore_bounds = state->HasRestoreBounds();
+ const bool has_restore_bounds = state->HasRestoreBounds();
- bool update_bounds =
- (state->IsNormalOrSnapped() || state->IsMinimized()) &&
- new_parent->GetShellWindowId() != kShellWindowId_DockedContainer;
+ const bool update_bounds = state->IsNormalOrSnapped() || state->IsMinimized();
gfx::Rect work_area_in_new_parent =
wm::GetDisplayWorkAreaBoundsInParent(new_parent);
@@ -208,7 +205,6 @@ void ReparentAllWindows(WmWindow* src, WmWindow* dst) {
// Set of windows to move.
const int kContainerIdsToMove[] = {
kShellWindowId_DefaultContainer,
- kShellWindowId_DockedContainer,
kShellWindowId_PanelContainer,
kShellWindowId_AlwaysOnTopContainer,
kShellWindowId_SystemModalContainer,
@@ -375,12 +371,6 @@ void RootWindowController::CreateShelfView() {
// managers.
if (panel_layout_manager_)
panel_layout_manager_->SetShelf(wm_shelf_.get());
- if (docked_window_layout_manager_) {
- docked_window_layout_manager_->SetShelf(wm_shelf_.get());
- if (wm_shelf_->shelf_layout_manager())
- docked_window_layout_manager_->AddObserver(
- wm_shelf_->shelf_layout_manager());
- }
// Notify shell observers that the shelf has been created.
// TODO(jamescook): Move this into WmShelf::InitializeShelf(). This will
@@ -572,13 +562,6 @@ void RootWindowController::Shutdown() {
void RootWindowController::CloseChildWindows() {
// NOTE: this may be called multiple times.
- // Remove observer as deactivating keyboard causes
- // docked_window_layout_manager() to fire notifications.
- if (docked_window_layout_manager() && wm_shelf_->shelf_layout_manager()) {
- docked_window_layout_manager()->RemoveObserver(
- wm_shelf_->shelf_layout_manager());
- }
-
// Deactivate keyboard container before closing child windows and shutting
// down associated layout managers.
DeactivateKeyboard(keyboard::KeyboardController::GetInstance());
@@ -589,13 +572,6 @@ void RootWindowController::CloseChildWindows() {
panel_layout_manager_ = nullptr;
}
- // |docked_window_layout_manager_| needs to be shut down before windows are
- // destroyed.
- if (docked_window_layout_manager_) {
- docked_window_layout_manager_->Shutdown();
- docked_window_layout_manager_ = nullptr;
- }
-
WmShelf* shelf = GetShelf();
shelf->ShutdownShelfWidget();
@@ -855,13 +831,6 @@ void RootWindowController::InitLayoutManagers() {
always_on_top_controller_ =
base::MakeUnique<AlwaysOnTopController>(always_on_top_container);
- // Create Docked windows layout manager
- WmWindow* docked_container = GetWmContainer(kShellWindowId_DockedContainer);
- docked_window_layout_manager_ =
- new DockedWindowLayoutManager(docked_container);
- docked_container->SetLayoutManager(
- base::WrapUnique(docked_window_layout_manager_));
-
// Create Panel layout manager
WmWindow* wm_panel_container = GetWmContainer(kShellWindowId_PanelContainer);
panel_layout_manager_ = new PanelLayoutManager(wm_panel_container);
@@ -951,15 +920,6 @@ void RootWindowController::CreateContainers() {
always_on_top_container->SetBoundsInScreenBehaviorForChildren(
WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES);
- WmWindow* docked_container =
- CreateContainer(kShellWindowId_DockedContainer, "DockedContainer",
- non_lock_screen_containers);
- docked_container->SetChildWindowVisibilityChangesAnimated();
- docked_container->SetSnapsChildrenToPhysicalPixelBoundary();
- docked_container->SetBoundsInScreenBehaviorForChildren(
- WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES);
- docked_container->SetChildrenUseExtendedHitRegion();
-
WmWindow* shelf_container =
CreateContainer(kShellWindowId_ShelfContainer, "ShelfContainer",
non_lock_screen_containers);
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/shell_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698