Chromium Code Reviews| Index: ash/shelf/shelf_layout_manager.cc |
| diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc |
| index 3f22fced9ea06879bb0126486b7c29cbfebfe92f..c0305290a5ec39ae923efc6824df891096408cf4 100644 |
| --- a/ash/shelf/shelf_layout_manager.cc |
| +++ b/ash/shelf/shelf_layout_manager.cc |
| @@ -101,8 +101,7 @@ const int ShelfLayoutManager::kShelfSize = 47; |
| const int ShelfLayoutManager::kShelfItemInset = 3; |
| int ShelfLayoutManager::GetPreferredShelfSize() { |
| - return ash::switches::UseAlternateShelfLayout() ? |
| - ShelfLayoutManager::kShelfSize : kShelfPreferredSize; |
|
Mr4D (OOO till 08-26)
2014/01/23 19:25:08
Just checking - is kShelfPreferredSize still neede
Harry McCleave
2014/01/24 22:48:47
I have removed this function but left GetButtonSiz
|
| + return ShelfLayoutManager::kShelfSize; |
| } |
| // ShelfLayoutManager::AutoHideEventFilter ------------------------------------- |
| @@ -760,16 +759,11 @@ void ShelfLayoutManager::CalculateTargetBounds( |
| gfx::Rect(available_bounds.x(), available_bounds.y(), |
| available_bounds.width(), shelf_height)); |
| - int status_inset = std::max(0, GetPreferredShelfSize() - |
| - PrimaryAxisValue(status_size.height(), status_size.width())); |
| - |
| - if (ash::switches::UseAlternateShelfLayout()) { |
| - status_inset = 0; |
| - if (IsHorizontalAlignment()) |
| - status_size.set_height(kShelfSize); |
| - else |
| - status_size.set_width(kShelfSize); |
| - } |
| + int status_inset = 0; |
| + if (IsHorizontalAlignment()) |
| + status_size.set_height(kShelfSize); |
| + else |
| + status_size.set_width(kShelfSize); |
| target_bounds->status_bounds_in_shelf = SelectValueForShelfAlignment( |
| gfx::Rect(base::i18n::IsRTL() ? 0 : shelf_width - status_size.width(), |
| @@ -880,16 +874,7 @@ void ShelfLayoutManager::UpdateTargetBoundsForGesture( |
| available_bounds.bottom() - shelf_height); |
| } |
| - if (ash::switches::UseAlternateShelfLayout()) { |
| - target_bounds->status_bounds_in_shelf.set_y(0); |
| - } else { |
| - // The statusbar should be in the center of the shelf. |
| - gfx::Rect status_y = target_bounds->shelf_bounds_in_root; |
| - status_y.set_y(0); |
| - status_y.ClampToCenteredSize( |
| - target_bounds->status_bounds_in_shelf.size()); |
| - target_bounds->status_bounds_in_shelf.set_y(status_y.y()); |
| - } |
| + target_bounds->status_bounds_in_shelf.set_y(0); |
| } else { |
| // Move and size the shelf with the gesture. |
| int shelf_width = target_bounds->shelf_bounds_in_root.width(); |
| @@ -905,21 +890,12 @@ void ShelfLayoutManager::UpdateTargetBoundsForGesture( |
| available_bounds.right() - shelf_width); |
| } |
| - if (ash::switches::UseAlternateShelfLayout()) { |
| - if (right_aligned) |
| - target_bounds->status_bounds_in_shelf.set_x(0); |
| - else |
| - target_bounds->status_bounds_in_shelf.set_x( |
| - target_bounds->shelf_bounds_in_root.width() - |
| - kShelfSize); |
| - } else { |
| - // The statusbar should be in the center of the shelf. |
| - gfx::Rect status_x = target_bounds->shelf_bounds_in_root; |
| - status_x.set_x(0); |
| - status_x.ClampToCenteredSize( |
| - target_bounds->status_bounds_in_shelf.size()); |
| - target_bounds->status_bounds_in_shelf.set_x(status_x.x()); |
| - } |
| + if (right_aligned) |
| + target_bounds->status_bounds_in_shelf.set_x(0); |
| + else |
| + target_bounds->status_bounds_in_shelf.set_x( |
| + target_bounds->shelf_bounds_in_root.width() - |
| + kShelfSize); |
| } |
| } |