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 88e729bfe4d52edaffeb51b1b3ca0803c8579155..47a4b9e259d928b939a735f1d065530f77c4becc 100644 |
--- a/ash/wm/panels/panel_layout_manager.cc |
+++ b/ash/wm/panels/panel_layout_manager.cc |
@@ -59,25 +59,24 @@ const int kArrowHeight = 9; |
class CalloutWidgetBackground : public views::Background { |
public: |
- CalloutWidgetBackground() : alignment_(SHELF_ALIGNMENT_BOTTOM) { |
- } |
+ CalloutWidgetBackground() : alignment_(wm::SHELF_ALIGNMENT_BOTTOM) {} |
void Paint(gfx::Canvas* canvas, views::View* view) const override { |
SkPath path; |
switch (alignment_) { |
- case SHELF_ALIGNMENT_BOTTOM: |
- case SHELF_ALIGNMENT_BOTTOM_LOCKED: |
+ case wm::SHELF_ALIGNMENT_BOTTOM: |
+ case wm::SHELF_ALIGNMENT_BOTTOM_LOCKED: |
path.moveTo(SkIntToScalar(0), SkIntToScalar(0)); |
path.lineTo(SkIntToScalar(kArrowWidth / 2), |
SkIntToScalar(kArrowHeight)); |
path.lineTo(SkIntToScalar(kArrowWidth), SkIntToScalar(0)); |
break; |
- case SHELF_ALIGNMENT_LEFT: |
+ case wm::SHELF_ALIGNMENT_LEFT: |
path.moveTo(SkIntToScalar(kArrowHeight), SkIntToScalar(kArrowWidth)); |
path.lineTo(SkIntToScalar(0), SkIntToScalar(kArrowWidth / 2)); |
path.lineTo(SkIntToScalar(kArrowHeight), SkIntToScalar(0)); |
break; |
- case SHELF_ALIGNMENT_RIGHT: |
+ case wm::SHELF_ALIGNMENT_RIGHT: |
path.moveTo(SkIntToScalar(0), SkIntToScalar(0)); |
path.lineTo(SkIntToScalar(kArrowHeight), |
SkIntToScalar(kArrowWidth / 2)); |
@@ -91,12 +90,12 @@ class CalloutWidgetBackground : public views::Background { |
canvas->DrawPath(path, paint); |
} |
- ShelfAlignment alignment() { return alignment_; } |
+ wm::ShelfAlignment alignment() { return alignment_; } |
- void set_alignment(ShelfAlignment alignment) { alignment_ = alignment; } |
+ void set_alignment(wm::ShelfAlignment alignment) { alignment_ = alignment; } |
private: |
- ShelfAlignment alignment_; |
+ wm::ShelfAlignment alignment_; |
DISALLOW_COPY_AND_ASSIGN(CalloutWidgetBackground); |
}; |
@@ -170,11 +169,11 @@ bool BoundsAdjacent(const gfx::Rect& bounds1, const gfx::Rect& bounds2) { |
bounds1.bottom() == bounds2.y(); |
} |
-gfx::Vector2d GetSlideInAnimationOffset(ShelfAlignment alignment) { |
+gfx::Vector2d GetSlideInAnimationOffset(wm::ShelfAlignment alignment) { |
gfx::Vector2d offset; |
- if (alignment == SHELF_ALIGNMENT_LEFT) |
+ if (alignment == wm::SHELF_ALIGNMENT_LEFT) |
offset.set_x(-kPanelSlideInOffset); |
- else if (alignment == SHELF_ALIGNMENT_RIGHT) |
+ else if (alignment == wm::SHELF_ALIGNMENT_RIGHT) |
offset.set_x(kPanelSlideInOffset); |
else |
offset.set_y(kPanelSlideInOffset); |
@@ -189,7 +188,7 @@ class PanelCalloutWidget : public views::Widget { |
InitWidget(container); |
} |
- void SetAlignment(ShelfAlignment alignment) { |
+ void SetAlignment(wm::ShelfAlignment alignment) { |
gfx::Rect callout_bounds = GetWindowBoundsInScreen(); |
if (IsHorizontalAlignment(alignment)) { |
callout_bounds.set_width(kArrowWidth); |
@@ -613,7 +612,7 @@ void PanelLayoutManager::Relayout() { |
base::AutoReset<bool> auto_reset_in_layout(&in_layout_, true); |
- const ShelfAlignment alignment = shelf_->alignment(); |
+ const wm::ShelfAlignment alignment = shelf_->alignment(); |
const bool horizontal = shelf_->IsHorizontalAlignment(); |
gfx::Rect shelf_bounds = panel_container_->ConvertRectFromScreen( |
shelf_->shelf_widget()->GetWindowBoundsInScreen()); |
@@ -706,9 +705,9 @@ void PanelLayoutManager::Relayout() { |
continue; |
bool slide_in = visible_panels[i].slide_in; |
gfx::Rect bounds = visible_panels[i].window->GetTargetBounds(); |
- if (alignment == SHELF_ALIGNMENT_LEFT) |
+ if (alignment == wm::SHELF_ALIGNMENT_LEFT) |
bounds.set_x(shelf_bounds.right()); |
- else if (alignment == SHELF_ALIGNMENT_RIGHT) |
+ else if (alignment == wm::SHELF_ALIGNMENT_RIGHT) |
bounds.set_x(shelf_bounds.x() - bounds.width()); |
else |
bounds.set_y(shelf_bounds.y() - bounds.height()); |
@@ -845,9 +844,9 @@ void PanelLayoutManager::UpdateCallouts() { |
current_bounds.y() - callout_bounds.y(), |
callout_bounds.bottom() - current_bounds.bottom()); |
} |
- if (shelf_->alignment() == SHELF_ALIGNMENT_LEFT) |
+ if (shelf_->alignment() == wm::SHELF_ALIGNMENT_LEFT) |
callout_bounds.set_x(bounds.x() - callout_bounds.width()); |
- else if (shelf_->alignment() == SHELF_ALIGNMENT_RIGHT) |
+ else if (shelf_->alignment() == wm::SHELF_ALIGNMENT_RIGHT) |
callout_bounds.set_x(bounds.right()); |
else |
callout_bounds.set_y(bounds.bottom()); |