| 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 #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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 string16 sync_state; | 42 string16 sync_state; |
| 43 | 43 |
| 44 // Whether or not the current profile is signed in. If true, |sync_state| is | 44 // Whether or not the current profile is signed in. If true, |sync_state| is |
| 45 // expected to be the email of the signed in user. | 45 // expected to be the email of the signed in user. |
| 46 bool signed_in; | 46 bool signed_in; |
| 47 | 47 |
| 48 // The index in the |profile_cache| that this Item represents. | 48 // The index in the |profile_cache| that this Item represents. |
| 49 size_t model_index; | 49 size_t model_index; |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 // Constructor. No parameters can be NULL in practice. |browser| can be NULL | 52 // Constructor. |observer| can be NULL. |browser| can be NULL and a new one |
| 53 // and a new one will be created if an action requires it. | 53 // will be created if an action requires it. |
| 54 AvatarMenuModel(ProfileInfoInterface* profile_cache, | 54 AvatarMenuModel(ProfileInfoInterface* profile_cache, |
| 55 AvatarMenuModelObserver* observer, | 55 AvatarMenuModelObserver* observer, |
| 56 Browser* browser); | 56 Browser* browser); |
| 57 virtual ~AvatarMenuModel(); | 57 virtual ~AvatarMenuModel(); |
| 58 | 58 |
| 59 // Actions performed by the view that the controller forwards back to the | 59 // Actions performed by the view that the controller forwards back to the |
| 60 // model: | 60 // model: |
| 61 // Opens a Browser with the specified profile in response to the user | 61 // Opens a Browser with the specified profile in response to the user |
| 62 // selecting an item. If |always_create| is true then a new window is created | 62 // selecting an item. If |always_create| is true then a new window is created |
| 63 // even if a window for that profile already exists. | 63 // even if a window for that profile already exists. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // List of built "menu items." | 108 // List of built "menu items." |
| 109 std::vector<Item*> items_; | 109 std::vector<Item*> items_; |
| 110 | 110 |
| 111 // Listens for notifications from the ProfileInfoCache. | 111 // Listens for notifications from the ProfileInfoCache. |
| 112 content::NotificationRegistrar registrar_; | 112 content::NotificationRegistrar registrar_; |
| 113 | 113 |
| 114 DISALLOW_COPY_AND_ASSIGN(AvatarMenuModel); | 114 DISALLOW_COPY_AND_ASSIGN(AvatarMenuModel); |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 #endif // CHROME_BROWSER_PROFILES_AVATAR_MENU_MODEL_H_ | 117 #endif // CHROME_BROWSER_PROFILES_AVATAR_MENU_MODEL_H_ |
| OLD | NEW |