| Index: ash/shelf/shelf_button.cc
|
| diff --git a/ash/shelf/shelf_button.cc b/ash/shelf/shelf_button.cc
|
| index f8c930d29ce9c4c65a5441bc013f0b3692b0ba3f..53cf800bbb5e92de9455233308ccf9c3be89871c 100644
|
| --- a/ash/shelf/shelf_button.cc
|
| +++ b/ash/shelf/shelf_button.cc
|
| @@ -8,9 +8,9 @@
|
|
|
| #include "ash/ash_constants.h"
|
| #include "ash/shelf/ink_drop_button_listener.h"
|
| +#include "ash/shelf/shelf.h"
|
| #include "ash/shelf/shelf_constants.h"
|
| #include "ash/shelf/shelf_view.h"
|
| -#include "ash/shelf/wm_shelf.h"
|
| #include "base/memory/ptr_util.h"
|
| #include "base/time/time.h"
|
| #include "skia/ext/image_operations.h"
|
| @@ -354,8 +354,8 @@ void ShelfButton::GetAccessibleNodeData(ui::AXNodeData* node_data) {
|
|
|
| void ShelfButton::Layout() {
|
| const gfx::Rect button_bounds(GetContentsBounds());
|
| - WmShelf* wm_shelf = shelf_view_->wm_shelf();
|
| - const bool is_horizontal_shelf = wm_shelf->IsHorizontalAlignment();
|
| + Shelf* shelf = shelf_view_->shelf();
|
| + const bool is_horizontal_shelf = shelf->IsHorizontalAlignment();
|
| const int icon_pad =
|
| is_horizontal_shelf ? kIconPaddingHorizontal : kIconPaddingVertical;
|
| int x_offset = is_horizontal_shelf ? 0 : icon_pad;
|
| @@ -366,7 +366,7 @@ void ShelfButton::Layout() {
|
|
|
| // If on the left or top 'invert' the inset so the constant gap is on
|
| // the interior (towards the center of display) edge of the shelf.
|
| - if (SHELF_ALIGNMENT_LEFT == wm_shelf->GetAlignment())
|
| + if (SHELF_ALIGNMENT_LEFT == shelf->alignment())
|
| x_offset = button_bounds.width() - (kIconSize + icon_pad);
|
|
|
| // Center icon with respect to the secondary axis.
|
| @@ -395,7 +395,7 @@ void ShelfButton::Layout() {
|
| DCHECK_LE(icon_width, kIconSize);
|
| DCHECK_LE(icon_height, kIconSize);
|
|
|
| - switch (wm_shelf->GetAlignment()) {
|
| + switch (shelf->alignment()) {
|
| case SHELF_ALIGNMENT_BOTTOM:
|
| case SHELF_ALIGNMENT_BOTTOM_LOCKED:
|
| indicator_midpoint.set_y(button_bounds.bottom() - kIndicatorRadiusDip -
|
| @@ -501,7 +501,7 @@ void ShelfButton::UpdateState() {
|
| state_ & STATE_RUNNING));
|
|
|
| const bool is_horizontal_shelf =
|
| - shelf_view_->wm_shelf()->IsHorizontalAlignment();
|
| + shelf_view_->shelf()->IsHorizontalAlignment();
|
| icon_view_->SetHorizontalAlignment(is_horizontal_shelf
|
| ? views::ImageView::CENTER
|
| : views::ImageView::LEADING);
|
|
|