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

Unified Diff: ash/shelf/shelf_alignment_menu.cc

Issue 1743493002: Cleanup ash shelf accessor functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ShelfBrowserTest. Created 4 years, 10 months 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
Index: ash/shelf/shelf_alignment_menu.cc
diff --git a/ash/shelf/shelf_alignment_menu.cc b/ash/shelf/shelf_alignment_menu.cc
index 6194b3ba0f818b83f59d14d1448cb1f689e98feb..ea5d67701bc31c68b2ff2ca43146cb7b72af7ebd 100644
--- a/ash/shelf/shelf_alignment_menu.cc
+++ b/ash/shelf/shelf_alignment_menu.cc
@@ -5,6 +5,7 @@
#include "ash/shelf/shelf_alignment_menu.h"
#include "ash/metrics/user_metrics_recorder.h"
+#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_types.h"
#include "ash/shell.h"
@@ -33,11 +34,11 @@ ShelfAlignmentMenu::ShelfAlignmentMenu(aura::Window* root)
ShelfAlignmentMenu::~ShelfAlignmentMenu() {}
bool ShelfAlignmentMenu::IsCommandIdChecked(int command_id) const {
- return ShelfLayoutManager::ForShelf(root_window_)
+ return Shelf::ForWindow(root_window_)
+ ->shelf_layout_manager()
->SelectValueForShelfAlignment(MENU_ALIGN_BOTTOM == command_id,
MENU_ALIGN_LEFT == command_id,
- MENU_ALIGN_RIGHT == command_id,
- false);
+ MENU_ALIGN_RIGHT == command_id, false);
}
bool ShelfAlignmentMenu::IsCommandIdEnabled(int command_id) const {
« ash/shelf/shelf.h ('K') | « ash/shelf/shelf.cc ('k') | ash/shelf/shelf_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698