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

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

Issue 471023003: Make sure the new confirmation bubble is always shown upon signin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: show new confirmation bubble after modal dialog closed 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 unified diff | Download patch | Annotate | Revision Log
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 "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/profiles/profile_info_cache_observer.h" 9 #include "chrome/browser/profiles/profile_info_cache_observer.h"
10 #include "chrome/browser/profiles/profile_avatar_icon_util.h" 10 #include "chrome/browser/profiles/profile_avatar_icon_util.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 int anchorX = switches::IsNewAvatarMenu() ? 158 int anchorX = switches::IsNewAvatarMenu() ?
159 NSMaxX([anchor bounds]) - kMenuXOffsetAdjust : 159 NSMaxX([anchor bounds]) - kMenuXOffsetAdjust :
160 NSMidX([anchor bounds]); 160 NSMidX([anchor bounds]);
161 NSPoint point = NSMakePoint(anchorX, 161 NSPoint point = NSMakePoint(anchorX,
162 NSMaxY([anchor bounds]) - kMenuYOffsetAdjust); 162 NSMaxY([anchor bounds]) - kMenuYOffsetAdjust);
163 point = [anchor convertPoint:point toView:nil]; 163 point = [anchor convertPoint:point toView:nil];
164 point = [[anchor window] convertBaseToScreen:point]; 164 point = [[anchor window] convertBaseToScreen:point];
165 165
166 // |menuController_| will automatically release itself on close. 166 // |menuController_| will automatically release itself on close.
167 if (switches::IsNewAvatarMenu()) { 167 if (switches::IsNewAvatarMenu()) {
168 profiles::BubbleViewMode viewMode = 168 profiles::BubbleViewMode viewMode;
169 profiles::BubbleViewModeFromAvatarBubbleMode(mode); 169 profiles::TutorialMode tutorialMode;
170 profiles::BubbleViewModeFromAvatarBubbleMode(mode, viewMode, tutorialMode);
170 menuController_ = 171 menuController_ =
171 [[ProfileChooserController alloc] initWithBrowser:browser_ 172 [[ProfileChooserController alloc] initWithBrowser:browser_
172 anchoredAt:point 173 anchoredAt:point
173 withMode:viewMode 174 withViewMode:viewMode
175 withTutorialMode:tutorialMode
174 withServiceType:serviceType]; 176 withServiceType:serviceType];
175 } else { 177 } else {
176 menuController_ = 178 menuController_ =
177 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ 179 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_
178 anchoredAt:point]; 180 anchoredAt:point];
179 } 181 }
180 182
181 [[NSNotificationCenter defaultCenter] 183 [[NSNotificationCenter defaultCenter]
182 addObserver:self 184 addObserver:self
183 selector:@selector(bubbleWillClose:) 185 selector:@selector(bubbleWillClose:)
(...skipping 26 matching lines...) Expand all
210 } 212 }
211 213
212 - (void)updateErrorStatus:(BOOL)hasError { 214 - (void)updateErrorStatus:(BOOL)hasError {
213 } 215 }
214 216
215 - (BaseBubbleController*)menuController { 217 - (BaseBubbleController*)menuController {
216 return menuController_; 218 return menuController_;
217 } 219 }
218 220
219 @end 221 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698