Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6092)

Unified Diff: chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm

Issue 485073002: Migrate signin error messages to the new avatar bubble (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed cros error Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser_window.h ('k') | chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm
diff --git a/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm b/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm
index e1b9ad10616915abbac391c296f85f1856ca90da..acc4b17d9bf595355a53b9ab96df0194712d99af 100644
--- a/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm
@@ -4,6 +4,7 @@
#import "chrome/browser/ui/cocoa/profiles/avatar_base_controller.h"
+#include "base/mac/foundation_util.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile_info_cache_observer.h"
@@ -141,8 +142,22 @@ class ProfileInfoUpdateObserver : public ProfileInfoCacheObserver,
- (void)showAvatarBubble:(NSView*)anchor
withMode:(BrowserWindow::AvatarBubbleMode)mode
withServiceType:(signin::GAIAServiceType)serviceType {
- if (menuController_)
+ if (menuController_) {
+ if (switches::IsNewAvatarMenu()) {
+ profiles::BubbleViewMode viewMode;
+ profiles::TutorialMode tutorialMode;
+ profiles::BubbleViewModeFromAvatarBubbleMode(
+ mode, &viewMode, &tutorialMode);
+ if (tutorialMode != profiles::TUTORIAL_MODE_NONE) {
+ ProfileChooserController* profileChooserController =
+ base::mac::ObjCCastStrict<ProfileChooserController>(
+ menuController_);
+ [profileChooserController setTutorialMode:tutorialMode];
+ [profileChooserController initMenuContentsWithView:viewMode];
+ }
+ }
return;
+ }
DCHECK(chrome::IsCommandEnabled(browser_, IDC_SHOW_AVATAR_MENU));
« no previous file with comments | « chrome/browser/ui/browser_window.h ('k') | chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698