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

Side by Side Diff: chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm

Issue 1120013003: Add right-click user switching tutorial bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 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 unified diff | Download patch
OLDNEW
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 #import "chrome/browser/ui/cocoa/profiles/avatar_base_controller.h" 5 #import "chrome/browser/ui/cocoa/profiles/avatar_base_controller.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/profiles/profile_info_cache_observer.h" 10 #include "chrome/browser/profiles/profile_info_cache_observer.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // |menuController_| will automatically release itself on close. 185 // |menuController_| will automatically release itself on close.
186 if (switches::IsNewAvatarMenu()) { 186 if (switches::IsNewAvatarMenu()) {
187 profiles::BubbleViewMode viewMode; 187 profiles::BubbleViewMode viewMode;
188 profiles::TutorialMode tutorialMode; 188 profiles::TutorialMode tutorialMode;
189 profiles::BubbleViewModeFromAvatarBubbleMode( 189 profiles::BubbleViewModeFromAvatarBubbleMode(
190 mode, &viewMode, &tutorialMode); 190 mode, &viewMode, &tutorialMode);
191 // Don't start creating the view if it would be an empty fast user switcher. 191 // Don't start creating the view if it would be an empty fast user switcher.
192 // It has to happen here to prevent the view system from creating an empty 192 // It has to happen here to prevent the view system from creating an empty
193 // container. 193 // container.
194 if (viewMode == profiles::BUBBLE_VIEW_MODE_FAST_PROFILE_CHOOSER && 194 if (viewMode == profiles::BUBBLE_VIEW_MODE_FAST_PROFILE_CHOOSER &&
195 profiles::HasProfileSwitchTargets(browser_->profile())) { 195 !profiles::HasProfileSwitchTargets(browser_->profile())) {
196 return; 196 return;
197 } 197 }
198 198
199 menuController_ = 199 menuController_ =
200 [[ProfileChooserController alloc] initWithBrowser:browser_ 200 [[ProfileChooserController alloc] initWithBrowser:browser_
201 anchoredAt:point 201 anchoredAt:point
202 viewMode:viewMode 202 viewMode:viewMode
203 tutorialMode:tutorialMode 203 tutorialMode:tutorialMode
204 serviceType:serviceType]; 204 serviceType:serviceType];
205 } else { 205 } else {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 251 }
252 252
253 - (void)updateErrorStatus:(BOOL)hasError { 253 - (void)updateErrorStatus:(BOOL)hasError {
254 } 254 }
255 255
256 - (BaseBubbleController*)menuController { 256 - (BaseBubbleController*)menuController {
257 return menuController_; 257 return menuController_;
258 } 258 }
259 259
260 @end 260 @end
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profiles_state.cc ('k') | chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698