| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_UI_VIEWS_PROFILES_PROFILE_CHOOSER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_CHOOSER_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_CHOOSER_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_CHOOSER_VIEW_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // the existing bubble will auto-close due to focus loss. | 59 // the existing bubble will auto-close due to focus loss. |
| 60 static void ShowBubble( | 60 static void ShowBubble( |
| 61 profiles::BubbleViewMode view_mode, | 61 profiles::BubbleViewMode view_mode, |
| 62 profiles::TutorialMode tutorial_mode, | 62 profiles::TutorialMode tutorial_mode, |
| 63 const signin::ManageAccountsParams& manage_accounts_params, | 63 const signin::ManageAccountsParams& manage_accounts_params, |
| 64 signin_metrics::AccessPoint access_point, | 64 signin_metrics::AccessPoint access_point, |
| 65 views::View* anchor_view, | 65 views::View* anchor_view, |
| 66 Browser* browser); | 66 Browser* browser); |
| 67 static bool IsShowing(); | 67 static bool IsShowing(); |
| 68 static void Hide(); | 68 static void Hide(); |
| 69 static int GetFixedMenuWidth(); |
| 69 | 70 |
| 70 private: | 71 private: |
| 71 friend class ProfileChooserViewExtensionsTest; | 72 friend class ProfileChooserViewExtensionsTest; |
| 72 | 73 |
| 73 typedef std::vector<size_t> Indexes; | 74 typedef std::vector<size_t> Indexes; |
| 74 typedef std::map<views::Button*, int> ButtonIndexes; | 75 typedef std::map<views::Button*, int> ButtonIndexes; |
| 75 typedef std::map<views::Button*, std::string> AccountButtonIndexes; | 76 typedef std::map<views::Button*, std::string> AccountButtonIndexes; |
| 76 | 77 |
| 77 ProfileChooserView(views::View* anchor_view, | 78 ProfileChooserView(views::View* anchor_view, |
| 78 Browser* browser, | 79 Browser* browser, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // bubble, options buttons, tutorials). | 142 // bubble, options buttons, tutorials). |
| 142 void PopulateCompleteProfileChooserView(views::GridLayout* layout, | 143 void PopulateCompleteProfileChooserView(views::GridLayout* layout, |
| 143 AvatarMenu* avatar_menu); | 144 AvatarMenu* avatar_menu); |
| 144 | 145 |
| 145 // Creates the main profile card for the profile |avatar_item|. |is_guest| | 146 // Creates the main profile card for the profile |avatar_item|. |is_guest| |
| 146 // is used to determine whether to show any Sign in/Sign out/Manage accounts | 147 // is used to determine whether to show any Sign in/Sign out/Manage accounts |
| 147 // links. | 148 // links. |
| 148 views::View* CreateCurrentProfileView( | 149 views::View* CreateCurrentProfileView( |
| 149 const AvatarMenu::Item& avatar_item, | 150 const AvatarMenu::Item& avatar_item, |
| 150 bool is_guest); | 151 bool is_guest); |
| 152 views::View* CreateMaterialDesignCurrentProfileView( |
| 153 const AvatarMenu::Item& avatar_item, |
| 154 bool is_guest); |
| 151 views::View* CreateGuestProfileView(); | 155 views::View* CreateGuestProfileView(); |
| 152 views::View* CreateOtherProfilesView(const Indexes& avatars_to_show); | 156 views::View* CreateOtherProfilesView(const Indexes& avatars_to_show); |
| 153 views::View* CreateOptionsView(bool display_lock); | 157 views::View* CreateOptionsView(bool display_lock); |
| 154 views::View* CreateSupervisedUserDisclaimerView(); | 158 views::View* CreateSupervisedUserDisclaimerView(); |
| 155 | 159 |
| 156 // Account Management view for the profile |avatar_item|. | 160 // Account Management view for the profile |avatar_item|. |
| 157 views::View* CreateCurrentProfileAccountsView( | 161 views::View* CreateCurrentProfileAccountsView( |
| 158 const AvatarMenu::Item& avatar_item); | 162 const AvatarMenu::Item& avatar_item); |
| 159 void CreateAccountButton(views::GridLayout* layout, | 163 void CreateAccountButton(views::GridLayout* layout, |
| 160 const std::string& account_id, | 164 const std::string& account_id, |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 // The GAIA service type provided in the response header. | 278 // The GAIA service type provided in the response header. |
| 275 signin::GAIAServiceType gaia_service_type_; | 279 signin::GAIAServiceType gaia_service_type_; |
| 276 | 280 |
| 277 // The current access point of sign in. | 281 // The current access point of sign in. |
| 278 const signin_metrics::AccessPoint access_point_; | 282 const signin_metrics::AccessPoint access_point_; |
| 279 | 283 |
| 280 DISALLOW_COPY_AND_ASSIGN(ProfileChooserView); | 284 DISALLOW_COPY_AND_ASSIGN(ProfileChooserView); |
| 281 }; | 285 }; |
| 282 | 286 |
| 283 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_CHOOSER_VIEW_H_ | 287 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_CHOOSER_VIEW_H_ |
| OLD | NEW |