| Index: ash/launcher/launcher_alignment_menu.cc
|
| diff --git a/ash/launcher/launcher_alignment_menu.cc b/ash/launcher/launcher_alignment_menu.cc
|
| index cfa242c19248b1c34e3f65ff6e4c31ed7a3cdc64..1136baa43d9d678c6d98d8c0ce4102db836136dd 100644
|
| --- a/ash/launcher/launcher_alignment_menu.cc
|
| +++ b/ash/launcher/launcher_alignment_menu.cc
|
| @@ -6,7 +6,9 @@
|
|
|
| #include "ash/shelf_types.h"
|
| #include "ash/shell.h"
|
| +#include "ash/wm/shelf_layout_manager.h"
|
| #include "grit/ash_strings.h"
|
| +#include "ui/aura/root_window.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
|
|
| namespace ash {
|
| @@ -33,19 +35,11 @@ LauncherAlignmentMenu::~LauncherAlignmentMenu() {
|
| }
|
|
|
| bool LauncherAlignmentMenu::IsCommandIdChecked(int command_id) const {
|
| - switch (command_id) {
|
| - case MENU_ALIGN_LEFT:
|
| - return Shell::GetInstance()->GetShelfAlignment(root_window_) ==
|
| - SHELF_ALIGNMENT_LEFT;
|
| - case MENU_ALIGN_BOTTOM:
|
| - return Shell::GetInstance()->GetShelfAlignment(root_window_) ==
|
| - SHELF_ALIGNMENT_BOTTOM;
|
| - case MENU_ALIGN_RIGHT:
|
| - return Shell::GetInstance()->GetShelfAlignment(root_window_) ==
|
| - SHELF_ALIGNMENT_RIGHT;
|
| - default:
|
| - return false;
|
| - }
|
| + return internal::ShelfLayoutManager::ForLauncher(root_window_)->
|
| + SelectValueForShelfAlignment(
|
| + MENU_ALIGN_BOTTOM == command_id,
|
| + MENU_ALIGN_LEFT == command_id,
|
| + MENU_ALIGN_RIGHT == command_id);
|
| }
|
|
|
| bool LauncherAlignmentMenu::IsCommandIdEnabled(int command_id) const {
|
|
|