OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/ui/ash/multi_user/multi_user_context_menu.h" | 5 #include "chrome/browser/ui/ash/multi_user/multi_user_context_menu.h" |
6 | 6 |
7 #include "ash/common/multi_profile_uma.h" | 7 #include "ash/common/multi_profile_uma.h" |
8 #include "ash/common/session/session_state_delegate.h" | 8 #include "ash/common/session/session_state_delegate.h" |
9 #include "ash/common/wm_shell.h" | 9 #include "ash/common/wm_shell.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 class MultiUserContextMenuChromeos : public ui::SimpleMenuModel, | 34 class MultiUserContextMenuChromeos : public ui::SimpleMenuModel, |
35 public ui::SimpleMenuModel::Delegate { | 35 public ui::SimpleMenuModel::Delegate { |
36 public: | 36 public: |
37 explicit MultiUserContextMenuChromeos(aura::Window* window); | 37 explicit MultiUserContextMenuChromeos(aura::Window* window); |
38 ~MultiUserContextMenuChromeos() override {} | 38 ~MultiUserContextMenuChromeos() override {} |
39 | 39 |
40 // SimpleMenuModel::Delegate: | 40 // SimpleMenuModel::Delegate: |
41 bool IsCommandIdChecked(int command_id) const override { return false; } | 41 bool IsCommandIdChecked(int command_id) const override { return false; } |
42 bool IsCommandIdEnabled(int command_id) const override { return true; } | 42 bool IsCommandIdEnabled(int command_id) const override { return true; } |
43 bool GetAcceleratorForCommandId(int command_id, | |
44 ui::Accelerator* accelerator) const override { | |
45 return false; | |
46 } | |
47 void ExecuteCommand(int command_id, int event_flags) override; | 43 void ExecuteCommand(int command_id, int event_flags) override; |
48 | 44 |
49 private: | 45 private: |
50 // The window for which this menu is. | 46 // The window for which this menu is. |
51 aura::Window* window_; | 47 aura::Window* window_; |
52 | 48 |
53 DISALLOW_COPY_AND_ASSIGN(MultiUserContextMenuChromeos); | 49 DISALLOW_COPY_AND_ASSIGN(MultiUserContextMenuChromeos); |
54 }; | 50 }; |
55 | 51 |
56 MultiUserContextMenuChromeos::MultiUserContextMenuChromeos(aura::Window* window) | 52 MultiUserContextMenuChromeos::MultiUserContextMenuChromeos(aura::Window* window) |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 return; | 139 return; |
144 } | 140 } |
145 } | 141 } |
146 chromeos::ShowMultiprofilesWarningDialog(on_accept); | 142 chromeos::ShowMultiprofilesWarningDialog(on_accept); |
147 return; | 143 return; |
148 } | 144 } |
149 default: | 145 default: |
150 NOTREACHED(); | 146 NOTREACHED(); |
151 } | 147 } |
152 } | 148 } |
OLD | NEW |