| 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/multi_profile_uma.h" | 7 #include "ash/multi_profile_uma.h" |
| 8 #include "ash/session/session_state_delegate.h" | 8 #include "ash/session/session_state_delegate.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 class MultiUserContextMenuChromeos : public ui::SimpleMenuModel, | 32 class MultiUserContextMenuChromeos : public ui::SimpleMenuModel, |
| 33 public ui::SimpleMenuModel::Delegate { | 33 public ui::SimpleMenuModel::Delegate { |
| 34 public: | 34 public: |
| 35 explicit MultiUserContextMenuChromeos(aura::Window* window); | 35 explicit MultiUserContextMenuChromeos(aura::Window* window); |
| 36 virtual ~MultiUserContextMenuChromeos() {} | 36 virtual ~MultiUserContextMenuChromeos() {} |
| 37 | 37 |
| 38 // SimpleMenuModel::Delegate: | 38 // SimpleMenuModel::Delegate: |
| 39 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE { | 39 virtual bool IsCommandIdChecked(int command_id) const override { |
| 40 return false; | 40 return false; |
| 41 } | 41 } |
| 42 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE { | 42 virtual bool IsCommandIdEnabled(int command_id) const override { |
| 43 return true; | 43 return true; |
| 44 } | 44 } |
| 45 virtual bool GetAcceleratorForCommandId( | 45 virtual bool GetAcceleratorForCommandId( |
| 46 int command_id, | 46 int command_id, |
| 47 ui::Accelerator* accelerator) OVERRIDE { | 47 ui::Accelerator* accelerator) override { |
| 48 return false; | 48 return false; |
| 49 } | 49 } |
| 50 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; | 50 virtual void ExecuteCommand(int command_id, int event_flags) override; |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 // The window for which this menu is. | 53 // The window for which this menu is. |
| 54 aura::Window* window_; | 54 aura::Window* window_; |
| 55 | 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(MultiUserContextMenuChromeos); | 56 DISALLOW_COPY_AND_ASSIGN(MultiUserContextMenuChromeos); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 MultiUserContextMenuChromeos::MultiUserContextMenuChromeos(aura::Window* window) | 59 MultiUserContextMenuChromeos::MultiUserContextMenuChromeos(aura::Window* window) |
| 60 : ui::SimpleMenuModel(this), | 60 : ui::SimpleMenuModel(this), |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 return; | 144 return; |
| 145 } | 145 } |
| 146 } | 146 } |
| 147 chromeos::ShowMultiprofilesWarningDialog(on_accept); | 147 chromeos::ShowMultiprofilesWarningDialog(on_accept); |
| 148 return; | 148 return; |
| 149 } | 149 } |
| 150 default: | 150 default: |
| 151 NOTREACHED(); | 151 NOTREACHED(); |
| 152 } | 152 } |
| 153 } | 153 } |
| OLD | NEW |