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

Unified Diff: ash/shelf/shelf_alignment_menu.cc

Issue 2899253002: chromeos: Rename ash::WmShelf to Shelf (Closed)
Patch Set: cleanup Created 3 years, 7 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 e01b2639c91de1f867627d91c0590300fba1ad61..ccd813053f03289709eb229b40e8fe233cf6ffed 100644
--- a/ash/shelf/shelf_alignment_menu.cc
+++ b/ash/shelf/shelf_alignment_menu.cc
@@ -6,15 +6,15 @@
#include "ash/metrics/user_metrics_action.h"
#include "ash/public/cpp/shelf_types.h"
-#include "ash/shelf/wm_shelf.h"
+#include "ash/shelf/shelf.h"
#include "ash/shell_port.h"
#include "ash/strings/grit/ash_strings.h"
namespace ash {
-ShelfAlignmentMenu::ShelfAlignmentMenu(WmShelf* wm_shelf)
- : ui::SimpleMenuModel(nullptr), wm_shelf_(wm_shelf) {
- DCHECK(wm_shelf_);
+ShelfAlignmentMenu::ShelfAlignmentMenu(Shelf* shelf)
+ : ui::SimpleMenuModel(nullptr), shelf_(shelf) {
+ DCHECK(shelf_);
const int align_group_id = 1;
set_delegate(this);
AddRadioItemWithStringId(
@@ -29,7 +29,7 @@ ShelfAlignmentMenu::ShelfAlignmentMenu(WmShelf* wm_shelf)
ShelfAlignmentMenu::~ShelfAlignmentMenu() {}
bool ShelfAlignmentMenu::IsCommandIdChecked(int command_id) const {
- switch (wm_shelf_->GetAlignment()) {
+ switch (shelf_->alignment()) {
case SHELF_ALIGNMENT_BOTTOM:
case SHELF_ALIGNMENT_BOTTOM_LOCKED:
return command_id == MENU_ALIGN_BOTTOM;
@@ -49,15 +49,15 @@ void ShelfAlignmentMenu::ExecuteCommand(int command_id, int event_flags) {
switch (static_cast<MenuItem>(command_id)) {
case MENU_ALIGN_LEFT:
ShellPort::Get()->RecordUserMetricsAction(UMA_SHELF_ALIGNMENT_SET_LEFT);
- wm_shelf_->SetAlignment(SHELF_ALIGNMENT_LEFT);
+ shelf_->SetAlignment(SHELF_ALIGNMENT_LEFT);
break;
case MENU_ALIGN_BOTTOM:
ShellPort::Get()->RecordUserMetricsAction(UMA_SHELF_ALIGNMENT_SET_BOTTOM);
- wm_shelf_->SetAlignment(SHELF_ALIGNMENT_BOTTOM);
+ shelf_->SetAlignment(SHELF_ALIGNMENT_BOTTOM);
break;
case MENU_ALIGN_RIGHT:
ShellPort::Get()->RecordUserMetricsAction(UMA_SHELF_ALIGNMENT_SET_RIGHT);
- wm_shelf_->SetAlignment(SHELF_ALIGNMENT_RIGHT);
+ shelf_->SetAlignment(SHELF_ALIGNMENT_RIGHT);
break;
}
}

Powered by Google App Engine
This is Rietveld 408576698