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 <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // the existing bubble will auto-close due to focus loss. | 55 // the existing bubble will auto-close due to focus loss. |
56 static void ShowBubble( | 56 static void ShowBubble( |
57 profiles::BubbleViewMode view_mode, | 57 profiles::BubbleViewMode view_mode, |
58 profiles::TutorialMode tutorial_mode, | 58 profiles::TutorialMode tutorial_mode, |
59 const signin::ManageAccountsParams& manage_accounts_params, | 59 const signin::ManageAccountsParams& manage_accounts_params, |
60 views::View* anchor_view, | 60 views::View* anchor_view, |
61 views::BubbleBorder::Arrow arrow, | 61 views::BubbleBorder::Arrow arrow, |
62 views::BubbleBorder::BubbleAlignment border_alignment, | 62 views::BubbleBorder::BubbleAlignment border_alignment, |
63 Browser* browser); | 63 Browser* browser); |
64 static bool IsShowing(); | 64 static bool IsShowing(); |
| 65 |
| 66 // A ShowingType to indicate whether the avatar bubble view is showing in a |
| 67 // designated browser. |
| 68 enum ShowingType { |
| 69 IS_NOT_SHOWING = 0, |
| 70 IS_SHOWING = 1, |
| 71 IS_SHOWING_IN_ANOTHER_BROWSER = 2, |
| 72 }; |
| 73 static ShowingType IsShowingInBrowser(const Browser* browser); |
65 static void Hide(); | 74 static void Hide(); |
66 | 75 |
67 private: | 76 private: |
68 friend class ProfileChooserViewExtensionsTest; | 77 friend class ProfileChooserViewExtensionsTest; |
69 | 78 |
70 typedef std::vector<size_t> Indexes; | 79 typedef std::vector<size_t> Indexes; |
71 typedef std::map<views::Button*, int> ButtonIndexes; | 80 typedef std::map<views::Button*, int> ButtonIndexes; |
72 typedef std::map<views::Button*, std::string> AccountButtonIndexes; | 81 typedef std::map<views::Button*, std::string> AccountButtonIndexes; |
73 | 82 |
74 ProfileChooserView(views::View* anchor_view, | 83 ProfileChooserView(views::View* anchor_view, |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 // The current tutorial mode. | 270 // The current tutorial mode. |
262 profiles::TutorialMode tutorial_mode_; | 271 profiles::TutorialMode tutorial_mode_; |
263 | 272 |
264 // The GAIA service type provided in the response header. | 273 // The GAIA service type provided in the response header. |
265 signin::GAIAServiceType gaia_service_type_; | 274 signin::GAIAServiceType gaia_service_type_; |
266 | 275 |
267 DISALLOW_COPY_AND_ASSIGN(ProfileChooserView); | 276 DISALLOW_COPY_AND_ASSIGN(ProfileChooserView); |
268 }; | 277 }; |
269 | 278 |
270 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_CHOOSER_VIEW_H_ | 279 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_CHOOSER_VIEW_H_ |
OLD | NEW |