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

Unified Diff: ash/shelf/shelf_button.cc

Issue 2899253002: chromeos: Rename ash::WmShelf to Shelf (Closed)
Patch Set: rebase Created 3 years, 7 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/shelf/shelf_bezel_event_handler.cc ('k') | ash/shelf/shelf_button_pressed_metric_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « ash/shelf/shelf_bezel_event_handler.cc ('k') | ash/shelf/shelf_button_pressed_metric_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698