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

Unified Diff: ash/wm/window_animations.cc

Issue 2272793005: ash: Move alignment and autohide behavior from Shelf to WmShelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments 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 side-by-side diff with in-line comments
Download patch
Index: ash/wm/window_animations.cc
diff --git a/ash/wm/window_animations.cc b/ash/wm/window_animations.cc
index 3746b6220382810f606cc3bc47e93a3114855381..db73900fdebae3cb11fe27127a5fb7f48a811820 100644
--- a/ash/wm/window_animations.cc
+++ b/ash/wm/window_animations.cc
@@ -13,6 +13,7 @@
#include "ash/common/shelf/shelf.h"
#include "ash/common/shelf/shelf_layout_manager.h"
#include "ash/common/shelf/shelf_widget.h"
+#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/wm/window_animation_types.h"
#include "ash/screen_util.h"
#include "ash/wm/window_util.h"
@@ -453,9 +454,9 @@ gfx::Rect GetMinimizeAnimationTargetBoundsInScreen(aura::Window* window) {
if (item_rect.width() != 0 || item_rect.height() != 0) {
if (shelf->shelf_layout_manager()->visibility_state() == SHELF_AUTO_HIDE) {
gfx::Rect shelf_bounds = shelf->shelf_widget()->GetWindowBoundsInScreen();
- if (shelf->alignment() == SHELF_ALIGNMENT_LEFT)
+ if (shelf->wm_shelf()->alignment() == SHELF_ALIGNMENT_LEFT)
item_rect.set_x(shelf_bounds.right());
- else if (shelf->alignment() == SHELF_ALIGNMENT_RIGHT)
+ else if (shelf->wm_shelf()->alignment() == SHELF_ALIGNMENT_RIGHT)
item_rect.set_x(shelf_bounds.x());
else
item_rect.set_y(shelf_bounds.y());
@@ -469,7 +470,7 @@ gfx::Rect GetMinimizeAnimationTargetBoundsInScreen(aura::Window* window) {
gfx::Rect work_area =
display::Screen::GetScreen()->GetDisplayNearestWindow(window).work_area();
int ltr_adjusted_x = base::i18n::IsRTL() ? work_area.right() : work_area.x();
- switch (shelf->alignment()) {
+ switch (shelf->wm_shelf()->alignment()) {
case SHELF_ALIGNMENT_BOTTOM:
case SHELF_ALIGNMENT_BOTTOM_LOCKED:
return gfx::Rect(ltr_adjusted_x, work_area.bottom(), 0, 0);
« no previous file with comments | « ash/wm/panels/panel_window_resizer_unittest.cc ('k') | ash/wm/workspace/workspace_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698