Index: ash/wm/panels/attached_panel_window_targeter.cc |
diff --git a/ash/wm/panels/attached_panel_window_targeter.cc b/ash/wm/panels/attached_panel_window_targeter.cc |
index c2c85df5d93124f91b94d57c222e12f71aed27df..027455983d0b98759208e745227f04679a37f0b3 100644 |
--- a/ash/wm/panels/attached_panel_window_targeter.cc |
+++ b/ash/wm/panels/attached_panel_window_targeter.cc |
@@ -4,8 +4,8 @@ |
#include "ash/wm/panels/attached_panel_window_targeter.h" |
-#include "ash/aura/wm_shelf_aura.h" |
#include "ash/aura/wm_window_aura.h" |
+#include "ash/common/shelf/wm_shelf.h" |
#include "ash/common/wm/panels/panel_layout_manager.h" |
#include "ash/common/wm_shell.h" |
#include "ash/shelf/shelf.h" |
@@ -53,12 +53,21 @@ void AttachedPanelWindowTargeter::UpdateTouchExtend(aura::Window* root_window) { |
DCHECK(panel_layout_manager_->shelf()); |
gfx::Insets touch(default_touch_extend_); |
- set_touch_extend( |
- WmShelfAura::GetShelf(panel_layout_manager_->shelf()) |
- ->SelectValueForShelfAlignment( |
- gfx::Insets(touch.top(), touch.left(), 0, touch.right()), |
- gfx::Insets(touch.top(), 0, touch.bottom(), touch.right()), |
- gfx::Insets(touch.top(), touch.left(), touch.bottom(), 0))); |
+ switch (panel_layout_manager_->shelf()->GetAlignment()) { |
+ case SHELF_ALIGNMENT_BOTTOM: |
+ case SHELF_ALIGNMENT_BOTTOM_LOCKED: |
+ set_touch_extend( |
+ gfx::Insets(touch.top(), touch.left(), 0, touch.right())); |
+ break; |
+ case SHELF_ALIGNMENT_LEFT: |
+ set_touch_extend( |
+ gfx::Insets(touch.top(), 0, touch.bottom(), touch.right())); |
+ break; |
+ case SHELF_ALIGNMENT_RIGHT: |
+ set_touch_extend( |
+ gfx::Insets(touch.top(), touch.left(), touch.bottom(), 0)); |
+ break; |
+ } |
} |
} // namespace ash |