| Index: ash/shell/context_menu.cc
|
| diff --git a/ash/shell/context_menu.cc b/ash/shell/context_menu.cc
|
| index 8282dacb3fc1f1e4a92621533cfecae76c898ef2..f55a80af428ad54ebad2686ed2630cc473c7edc4 100644
|
| --- a/ash/shell/context_menu.cc
|
| +++ b/ash/shell/context_menu.cc
|
| @@ -5,17 +5,15 @@
|
| #include "ash/shell/context_menu.h"
|
|
|
| #include "ash/public/cpp/shelf_types.h"
|
| -#include "ash/shelf/wm_shelf.h"
|
| +#include "ash/shelf/shelf.h"
|
| #include "ash/strings/grit/ash_strings.h"
|
|
|
| namespace ash {
|
| namespace shell {
|
|
|
| -ContextMenu::ContextMenu(WmShelf* wm_shelf)
|
| - : ui::SimpleMenuModel(nullptr),
|
| - wm_shelf_(wm_shelf),
|
| - alignment_menu_(wm_shelf) {
|
| - DCHECK(wm_shelf_);
|
| +ContextMenu::ContextMenu(Shelf* shelf)
|
| + : ui::SimpleMenuModel(nullptr), shelf_(shelf), alignment_menu_(shelf) {
|
| + DCHECK(shelf_);
|
| set_delegate(this);
|
| AddCheckItemWithStringId(MENU_AUTO_HIDE,
|
| IDS_ASH_SHELF_CONTEXT_MENU_AUTO_HIDE);
|
| @@ -27,7 +25,7 @@ ContextMenu::~ContextMenu() {}
|
|
|
| bool ContextMenu::IsCommandIdChecked(int command_id) const {
|
| if (command_id == MENU_AUTO_HIDE)
|
| - return wm_shelf_->auto_hide_behavior() == SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS;
|
| + return shelf_->auto_hide_behavior() == SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS;
|
| return false;
|
| }
|
|
|
| @@ -37,10 +35,10 @@ bool ContextMenu::IsCommandIdEnabled(int command_id) const {
|
|
|
| void ContextMenu::ExecuteCommand(int command_id, int event_flags) {
|
| if (command_id == MENU_AUTO_HIDE) {
|
| - wm_shelf_->SetAutoHideBehavior(wm_shelf_->auto_hide_behavior() ==
|
| - SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS
|
| - ? SHELF_AUTO_HIDE_BEHAVIOR_NEVER
|
| - : SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
|
| + shelf_->SetAutoHideBehavior(shelf_->auto_hide_behavior() ==
|
| + SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS
|
| + ? SHELF_AUTO_HIDE_BEHAVIOR_NEVER
|
| + : SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
|
| }
|
| }
|
|
|
|
|