OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_STATUS_MENU_MODEL_H_ | |
6 #define CHROME_BROWSER_PROFILES_PROFILE_STATUS_MENU_MODEL_H_ | |
Andrew T Wilson (Slow)
2011/05/20 00:22:09
I'm not sure this is heavy-weight enough to deserv
rpetterson
2011/05/20 05:53:17
So the real reason that it is its own class is bec
Miranda Callahan
2011/05/20 15:20:17
Actually, I think that my menu class needs a vecto
| |
7 #pragma once | |
8 | |
9 #include "base/string16.h" | |
10 #include "base/task.h" | |
11 #include "ui/base/models/simple_menu_model.h" | |
12 | |
13 class Profile; | |
14 | |
15 // An implement of SimpleMenuModel which adds profile information when | |
16 // executing a command. | |
17 class ProfileStatusMenuModel : public ui::SimpleMenuModel { | |
18 public: | |
19 class Delegate : public ui::SimpleMenuModel::Delegate { | |
20 public: | |
21 // Performs the action associated with the specified command id. | |
22 virtual void ExecuteCommand(int command_id, Profile* profile) = 0; | |
23 | |
24 protected: | |
25 virtual ~Delegate() {} | |
26 }; | |
27 | |
28 explicit ProfileStatusMenuModel(Delegate* delegate, Profile* profile); | |
29 virtual ~ProfileStatusMenuModel(); | |
30 | |
31 virtual void ActivatedAt(int index) OVERRIDE; | |
32 | |
33 private: | |
34 Delegate* delegate_; | |
35 | |
36 Profile* profile_; | |
37 }; | |
38 | |
39 #endif // CHROME_BROWSER_PROFILES_PROFILE_MENU_MODEL_H_ | |
OLD | NEW |