OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CHROME_BROWSER_PROFILES_AVATAR_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_AVATAR_MENU_MODEL_H_ |
6 #define CHROME_BROWSER_PROFILES_AVATAR_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_PROFILES_AVATAR_MENU_MODEL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // for unit tests, but no actions should be executed. | 52 // for unit tests, but no actions should be executed. |
53 AvatarMenuModel(ProfileInfoInterface* profile_cache, | 53 AvatarMenuModel(ProfileInfoInterface* profile_cache, |
54 AvatarMenuModelObserver* observer, | 54 AvatarMenuModelObserver* observer, |
55 Browser* browser); | 55 Browser* browser); |
56 virtual ~AvatarMenuModel(); | 56 virtual ~AvatarMenuModel(); |
57 | 57 |
58 // Actions performed by the view that the controller forwards back to the | 58 // Actions performed by the view that the controller forwards back to the |
59 // model: | 59 // model: |
60 // Opens a Browser with the specified profile in response to the user | 60 // Opens a Browser with the specified profile in response to the user |
61 // selecting an item. | 61 // selecting an item. |
62 void SwitchToProfile(size_t index); | 62 void SwichToProfile(size_t index); |
63 // Opens the profile settings in response to clicking the edit button next to | 63 // Opens the profile settings in response to clicking the edit button next to |
64 // an item. | 64 // an item. |
65 void EditProfile(size_t index); | 65 void EditProfile(size_t index); |
66 // Creates a new profile. | 66 // Creates a new profile. |
67 void AddNewProfile(); | 67 void AddNewProfile(); |
68 | 68 |
69 // Gets the number of profiles. | 69 // Gets the number of profiles. |
70 size_t GetNumberOfItems(); | 70 size_t GetNumberOfItems(); |
71 | 71 |
72 // Gets the an Item at a specified index. | 72 // Gets the an Item at a specified index. |
(...skipping 23 matching lines...) Expand all Loading... |
96 // List of built "menu items." | 96 // List of built "menu items." |
97 std::vector<Item*> items_; | 97 std::vector<Item*> items_; |
98 | 98 |
99 // Listens for notifications from the ProfileInfoCache. | 99 // Listens for notifications from the ProfileInfoCache. |
100 NotificationRegistrar registrar_; | 100 NotificationRegistrar registrar_; |
101 | 101 |
102 DISALLOW_COPY_AND_ASSIGN(AvatarMenuModel); | 102 DISALLOW_COPY_AND_ASSIGN(AvatarMenuModel); |
103 }; | 103 }; |
104 | 104 |
105 #endif // CHROME_BROWSER_PROFILES_AVATAR_MENU_MODEL_H_ | 105 #endif // CHROME_BROWSER_PROFILES_AVATAR_MENU_MODEL_H_ |
OLD | NEW |