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 #ifndef CHROME_BROWSER_PROFILES_AVATAR_MENU_ACTIONS_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_AVATAR_MENU_ACTIONS_H_ |
6 #define CHROME_BROWSER_PROFILES_AVATAR_MENU_ACTIONS_H_ | 6 #define CHROME_BROWSER_PROFILES_AVATAR_MENU_ACTIONS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/profiles/avatar_menu.h" | 10 #include "chrome/browser/profiles/avatar_menu.h" |
11 #include "chrome/browser/profiles/profile_metrics.h" | 11 #include "chrome/browser/profiles/profile_metrics.h" |
12 | 12 |
13 class Profile; | 13 class Profile; |
14 | 14 |
15 // This interface controls the behavior of avatar menu actions. | 15 // This interface controls the behavior of avatar menu actions. |
16 class AvatarMenuActions { | 16 class AvatarMenuActions { |
17 public: | 17 public: |
18 virtual ~AvatarMenuActions() {} | 18 virtual ~AvatarMenuActions() {} |
19 | 19 |
20 static AvatarMenuActions* Create(); | 20 static AvatarMenuActions* Create(); |
21 | 21 |
22 // Allows the user to create a new profile. | 22 // Allows the user to create a new profile. |
23 virtual void AddNewProfile(ProfileMetrics::ProfileAdd type) = 0; | 23 virtual void AddNewProfile(ProfileMetrics::ProfileAdd type) = 0; |
24 | 24 |
25 // Allows the user to edit the profile at the given index in the cache. | 25 // Allows the user to edit the profile at the given index in the cache. |
Mike Lerman
2015/08/06 16:06:19
change the comment, there's no index anymore.
| |
26 virtual void EditProfile(Profile* profile, size_t index) = 0; | 26 virtual void EditProfile(Profile* profile) = 0; |
27 | 27 |
28 // Returns true if the add profile link should be shown. | 28 // Returns true if the add profile link should be shown. |
29 virtual bool ShouldShowAddNewProfileLink() const = 0; | 29 virtual bool ShouldShowAddNewProfileLink() const = 0; |
30 | 30 |
31 // Returns true if the edit profile link should be shown. | 31 // Returns true if the edit profile link should be shown. |
32 virtual bool ShouldShowEditProfileLink() const = 0; | 32 virtual bool ShouldShowEditProfileLink() const = 0; |
33 | 33 |
34 // Updates the browser. | 34 // Updates the browser. |
35 // TODO: Delegate browser actions to remove dependency on Browser class. | 35 // TODO: Delegate browser actions to remove dependency on Browser class. |
36 virtual void ActiveBrowserChanged(Browser* browser) = 0; | 36 virtual void ActiveBrowserChanged(Browser* browser) = 0; |
37 }; | 37 }; |
38 | 38 |
39 #endif // CHROME_BROWSER_PROFILES_AVATAR_MENU_ACTIONS_H_ | 39 #endif // CHROME_BROWSER_PROFILES_AVATAR_MENU_ACTIONS_H_ |
OLD | NEW |