OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/shell/context_menu.h" | 5 #include "ash/shell/context_menu.h" |
6 | 6 |
| 7 #include "ash/common/shelf/shelf_types.h" |
7 #include "ash/shelf/shelf.h" | 8 #include "ash/shelf/shelf.h" |
8 #include "ash/shelf/shelf_types.h" | |
9 #include "grit/ash_strings.h" | 9 #include "grit/ash_strings.h" |
10 | 10 |
11 namespace ash { | 11 namespace ash { |
12 namespace shell { | 12 namespace shell { |
13 | 13 |
14 ContextMenu::ContextMenu(ash::Shelf* shelf) | 14 ContextMenu::ContextMenu(ash::Shelf* shelf) |
15 : ui::SimpleMenuModel(nullptr), shelf_(shelf), alignment_menu_(shelf) { | 15 : ui::SimpleMenuModel(nullptr), shelf_(shelf), alignment_menu_(shelf) { |
16 DCHECK(shelf_); | 16 DCHECK(shelf_); |
17 set_delegate(this); | 17 set_delegate(this); |
18 AddCheckItemWithStringId(MENU_AUTO_HIDE, | 18 AddCheckItemWithStringId(MENU_AUTO_HIDE, |
(...skipping 25 matching lines...) Expand all Loading... |
44 if (command_id == MENU_AUTO_HIDE) { | 44 if (command_id == MENU_AUTO_HIDE) { |
45 shelf_->SetAutoHideBehavior(shelf_->auto_hide_behavior() == | 45 shelf_->SetAutoHideBehavior(shelf_->auto_hide_behavior() == |
46 SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS | 46 SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS |
47 ? SHELF_AUTO_HIDE_BEHAVIOR_NEVER | 47 ? SHELF_AUTO_HIDE_BEHAVIOR_NEVER |
48 : SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); | 48 : SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
49 } | 49 } |
50 } | 50 } |
51 | 51 |
52 } // namespace shell | 52 } // namespace shell |
53 } // namespace ash | 53 } // namespace ash |
OLD | NEW |