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

Unified Diff: ash/wm/panels/panel_layout_manager.cc

Issue 1849623002: Remove unused ash::SHELF_ALIGNMENT_TOP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix autoformat problem with <x, >y Created 4 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
Index: ash/wm/panels/panel_layout_manager.cc
diff --git a/ash/wm/panels/panel_layout_manager.cc b/ash/wm/panels/panel_layout_manager.cc
index e1bd6a70647b13be63659b4293807e3cdcdc53f8..24da733897d373b87608f54425dc33c51e61514f 100644
--- a/ash/wm/panels/panel_layout_manager.cc
+++ b/ash/wm/panels/panel_layout_manager.cc
@@ -79,11 +79,6 @@ class CalloutWidgetBackground : public views::Background {
path.lineTo(SkIntToScalar(0), SkIntToScalar(kArrowWidth / 2));
path.lineTo(SkIntToScalar(kArrowHeight), SkIntToScalar(0));
break;
- case SHELF_ALIGNMENT_TOP:
- path.moveTo(SkIntToScalar(0), SkIntToScalar(kArrowHeight));
- path.lineTo(SkIntToScalar(kArrowWidth / 2), SkIntToScalar(0));
- path.lineTo(SkIntToScalar(kArrowWidth), SkIntToScalar(kArrowHeight));
- break;
case SHELF_ALIGNMENT_RIGHT:
path.moveTo(SkIntToScalar(0), SkIntToScalar(0));
path.lineTo(SkIntToScalar(kArrowHeight),
@@ -193,9 +188,6 @@ gfx::Vector2d GetSlideInAnimationOffset(ShelfAlignment alignment) {
case SHELF_ALIGNMENT_RIGHT:
offset.set_x(kPanelSlideInOffset);
break;
- case SHELF_ALIGNMENT_TOP:
- offset.set_y(-kPanelSlideInOffset);
- break;
}
return offset;
}
@@ -211,8 +203,7 @@ class PanelCalloutWidget : public views::Widget {
void SetAlignment(ShelfAlignment alignment) {
gfx::Rect callout_bounds = GetWindowBoundsInScreen();
- if (alignment == SHELF_ALIGNMENT_BOTTOM ||
- alignment == SHELF_ALIGNMENT_TOP) {
+ if (alignment == SHELF_ALIGNMENT_BOTTOM) {
callout_bounds.set_width(kArrowWidth);
callout_bounds.set_height(kArrowHeight);
} else {
@@ -721,9 +712,6 @@ void PanelLayoutManager::Relayout() {
case SHELF_ALIGNMENT_RIGHT:
bounds.set_x(shelf_bounds.x() - bounds.width());
break;
- case SHELF_ALIGNMENT_TOP:
- bounds.set_y(shelf_bounds.bottom());
- break;
}
bool on_shelf = visible_panels[i].window->GetTargetBounds() == bounds;
@@ -867,9 +855,6 @@ void PanelLayoutManager::UpdateCallouts() {
case SHELF_ALIGNMENT_RIGHT:
callout_bounds.set_x(bounds.right());
break;
- case SHELF_ALIGNMENT_TOP:
- callout_bounds.set_y(bounds.y() - callout_bounds.height());
- break;
}
callout_bounds = ScreenUtil::ConvertRectFromScreen(
callout_widget->GetNativeWindow()->parent(),

Powered by Google App Engine
This is Rietveld 408576698