| Index: ash/shelf/shelf_bezel_event_filter.cc
|
| diff --git a/ash/shelf/shelf_bezel_event_filter.cc b/ash/shelf/shelf_bezel_event_filter.cc
|
| index 39f81012cba53ca5dfdbc81e74daffcbd353025c..3d6ab4765be2875066e39bb8dbb66412099b0b93 100644
|
| --- a/ash/shelf/shelf_bezel_event_filter.cc
|
| +++ b/ash/shelf/shelf_bezel_event_filter.cc
|
| @@ -51,24 +51,11 @@ void ShelfBezelEventFilter::OnGestureEvent(
|
| }
|
| }
|
|
|
| -bool ShelfBezelEventFilter::IsShelfOnBezel(
|
| - const gfx::Rect& screen,
|
| - const gfx::Point& point) const{
|
| - switch (shelf_->GetAlignment()) {
|
| - case SHELF_ALIGNMENT_BOTTOM:
|
| - if (point.y() >= screen.bottom())
|
| - return true;
|
| - break;
|
| - case SHELF_ALIGNMENT_LEFT:
|
| - if (point.x() <= screen.x())
|
| - return true;
|
| - break;
|
| - case SHELF_ALIGNMENT_RIGHT:
|
| - if (point.x() >= screen.right())
|
| - return true;
|
| - break;
|
| - }
|
| - return false;
|
| +bool ShelfBezelEventFilter::IsShelfOnBezel(const gfx::Rect& screen,
|
| + const gfx::Point& point) const {
|
| + return shelf_->SelectValueForShelfAlignment(point.y() >= screen.bottom(),
|
| + point.x() <= screen.x(),
|
| + point.x() >= screen.right());
|
| }
|
|
|
| } // namespace ash
|
|
|