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

Unified Diff: ash/wm/app_list_controller.cc

Issue 11434099: Use the correct launcher assets for shelf alignment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years 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/root_window_controller.cc ('k') | ash/wm/shelf_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/app_list_controller.cc
diff --git a/ash/wm/app_list_controller.cc b/ash/wm/app_list_controller.cc
index e0785c87578dd08098efc6e41d41f1f6027fe5ff..bf02979ceaa0d541392fcbd2347378f48ca2418f 100644
--- a/ash/wm/app_list_controller.cc
+++ b/ash/wm/app_list_controller.cc
@@ -45,19 +45,11 @@ ui::Layer* GetLayer(views::Widget* widget) {
views::BubbleBorder::ArrowLocation GetBubbleArrowLocation(
aura::Window* window) {
DCHECK(Shell::HasInstance());
- ShelfAlignment shelf_alignment = Shell::GetInstance()->GetShelfAlignment(
- window->GetRootWindow());
- switch (shelf_alignment) {
- case ash::SHELF_ALIGNMENT_BOTTOM:
- return views::BubbleBorder::BOTTOM_CENTER;
- case ash::SHELF_ALIGNMENT_LEFT:
- return views::BubbleBorder::LEFT_CENTER;
- case ash::SHELF_ALIGNMENT_RIGHT:
- return views::BubbleBorder::RIGHT_CENTER;
- default:
- NOTREACHED() << "Unknown shelf alignment " << shelf_alignment;
- return views::BubbleBorder::BOTTOM_CENTER;
- }
+ return ShelfLayoutManager::ForLauncher(window)->
+ SelectValueForShelfAlignment(
+ views::BubbleBorder::BOTTOM_CENTER,
+ views::BubbleBorder::LEFT_CENTER,
+ views::BubbleBorder::RIGHT_CENTER);
}
// Offset given |rect| towards shelf.
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/wm/shelf_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698