| 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_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_AVATAR_MENU_H_ |
| 6 #define CHROME_BROWSER_PROFILES_AVATAR_MENU_H_ | 6 #define CHROME_BROWSER_PROFILES_AVATAR_MENU_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 static void GetImageForMenuButton(Profile* profile, | 87 static void GetImageForMenuButton(Profile* profile, |
| 88 gfx::Image* image, | 88 gfx::Image* image, |
| 89 bool* is_rectangle); | 89 bool* is_rectangle); |
| 90 | 90 |
| 91 // Compare items by name. | 91 // Compare items by name. |
| 92 static bool CompareItems(const Item* item1, const Item* item2); | 92 static bool CompareItems(const Item* item1, const Item* item2); |
| 93 | 93 |
| 94 // Opens a Browser with the specified profile in response to the user | 94 // Opens a Browser with the specified profile in response to the user |
| 95 // selecting an item. If |always_create| is true then a new window is created | 95 // selecting an item. If |always_create| is true then a new window is created |
| 96 // even if a window for that profile already exists. | 96 // even if a window for that profile already exists. |
| 97 void SwitchToProfile(size_t index, bool always_create); | 97 void SwitchToProfile(size_t index, |
| 98 bool always_create, |
| 99 ProfileMetrics::ProfileOpen metric); |
| 98 | 100 |
| 99 // Creates a new profile. | 101 // Creates a new profile. |
| 100 void AddNewProfile(ProfileMetrics::ProfileAdd type); | 102 void AddNewProfile(ProfileMetrics::ProfileAdd type); |
| 101 | 103 |
| 102 // Opens the profile settings in response to clicking the edit button next to | 104 // Opens the profile settings in response to clicking the edit button next to |
| 103 // an item. | 105 // an item. |
| 104 void EditProfile(size_t index); | 106 void EditProfile(size_t index); |
| 105 | 107 |
| 106 // Rebuilds the menu from the cache. | 108 // Rebuilds the menu from the cache. |
| 107 void RebuildMenu(); | 109 void RebuildMenu(); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 // Browser in which this avatar menu resides. Weak. | 157 // Browser in which this avatar menu resides. Weak. |
| 156 Browser* browser_; | 158 Browser* browser_; |
| 157 | 159 |
| 158 // Listens for notifications from the ProfileInfoCache. | 160 // Listens for notifications from the ProfileInfoCache. |
| 159 content::NotificationRegistrar registrar_; | 161 content::NotificationRegistrar registrar_; |
| 160 | 162 |
| 161 DISALLOW_COPY_AND_ASSIGN(AvatarMenu); | 163 DISALLOW_COPY_AND_ASSIGN(AvatarMenu); |
| 162 }; | 164 }; |
| 163 | 165 |
| 164 #endif // CHROME_BROWSER_PROFILES_AVATAR_MENU_H_ | 166 #endif // CHROME_BROWSER_PROFILES_AVATAR_MENU_H_ |
| OLD | NEW |