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_COCOA_PROFILES_PROFILE_CHOOSER_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_PROFILES_PROFILE_CHOOSER_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_PROFILES_PROFILE_CHOOSER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_PROFILES_PROFILE_CHOOSER_CONTROLLER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "chrome/browser/signin/signin_header_helper.h" | |
13 #include "chrome/browser/ui/profile_chooser_constants.h" | 14 #include "chrome/browser/ui/profile_chooser_constants.h" |
14 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" | 15 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
15 | 16 |
16 class AvatarMenu; | 17 class AvatarMenu; |
17 class ActiveProfileObserverBridge; | 18 class ActiveProfileObserverBridge; |
18 class Browser; | 19 class Browser; |
19 class ProfileOAuth2TokenService; | 20 class ProfileOAuth2TokenService; |
20 | 21 |
21 namespace content { | 22 namespace content { |
22 class WebContents; | 23 class WebContents; |
(...skipping 27 matching lines...) Expand all Loading... | |
50 // List of the full, un-elided accounts for the active profile. The keys are | 51 // List of the full, un-elided accounts for the active profile. The keys are |
51 // generated used to tag the UI buttons, and the values are the original | 52 // generated used to tag the UI buttons, and the values are the original |
52 // emails displayed by the buttons. | 53 // emails displayed by the buttons. |
53 std::map<int, std::string> currentProfileAccounts_; | 54 std::map<int, std::string> currentProfileAccounts_; |
54 | 55 |
55 // Web contents used by the inline signin view. | 56 // Web contents used by the inline signin view. |
56 scoped_ptr<content::WebContents> webContents_; | 57 scoped_ptr<content::WebContents> webContents_; |
57 | 58 |
58 // Whether the bubble is displayed for an active guest profile. | 59 // Whether the bubble is displayed for an active guest profile. |
59 BOOL isGuestSession_; | 60 BOOL isGuestSession_; |
61 | |
62 // The GAIA service type that caused this menu to open. | |
63 signin::GAIAServiceType GAIAServiceType_; | |
Scott Hess - ex-Googler
2014/05/30 04:09:27
Hmm, and also I think it would be gaiaServiceType_
Mike Lerman
2014/05/30 17:46:25
Done.
| |
60 } | 64 } |
61 | 65 |
62 - (id)initWithBrowser:(Browser*)browser | 66 - (id)initWithBrowser:(Browser*)browser |
63 anchoredAt:(NSPoint)point | 67 anchoredAt:(NSPoint)point |
64 withMode:(profiles::BubbleViewMode)mode; | 68 withMode:(profiles::BubbleViewMode)mode |
69 withServiceType:(signin::GAIAServiceType)GAIAServiceType; | |
65 | 70 |
66 // Creates all the subviews of the avatar bubble for |viewToDisplay|. | 71 // Creates all the subviews of the avatar bubble for |viewToDisplay|. |
67 - (void)initMenuContentsWithView:(profiles::BubbleViewMode)viewToDisplay; | 72 - (void)initMenuContentsWithView:(profiles::BubbleViewMode)viewToDisplay; |
68 | 73 |
69 // Returns the view currently displayed by the bubble. | 74 // Returns the view currently displayed by the bubble. |
70 - (profiles::BubbleViewMode)viewMode; | 75 - (profiles::BubbleViewMode)viewMode; |
71 | 76 |
72 // Switches to a given profile. |sender| is an ProfileChooserItemController. | 77 // Switches to a given profile. |sender| is an ProfileChooserItemController. |
73 - (IBAction)switchToProfile:(id)sender; | 78 - (IBAction)switchToProfile:(id)sender; |
74 | 79 |
(...skipping 30 matching lines...) Expand all Loading... | |
105 | 110 |
106 // Reset the WebContents used by the Gaia embedded view. | 111 // Reset the WebContents used by the Gaia embedded view. |
107 - (void)cleanUpEmbeddedViewContents; | 112 - (void)cleanUpEmbeddedViewContents; |
108 @end | 113 @end |
109 | 114 |
110 // Testing API ///////////////////////////////////////////////////////////////// | 115 // Testing API ///////////////////////////////////////////////////////////////// |
111 | 116 |
112 @interface ProfileChooserController (ExposedForTesting) | 117 @interface ProfileChooserController (ExposedForTesting) |
113 - (id)initWithBrowser:(Browser*)browser | 118 - (id)initWithBrowser:(Browser*)browser |
114 anchoredAt:(NSPoint)point | 119 anchoredAt:(NSPoint)point |
115 withMode:(profiles::BubbleViewMode)mode; | 120 withMode:(profiles::BubbleViewMode)mode |
121 withServiceType:(signin::GAIAServiceType)GAIAServiceType; | |
116 @end | 122 @end |
117 | 123 |
118 #endif // CHROME_BROWSER_UI_COCOA_PROFILES_PROFILE_CHOOSER_CONTROLLER_H_ | 124 #endif // CHROME_BROWSER_UI_COCOA_PROFILES_PROFILE_CHOOSER_CONTROLLER_H_ |
OLD | NEW |