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 #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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 [[NSNotificationCenter defaultCenter] | 211 [[NSNotificationCenter defaultCenter] |
212 addObserver:self | 212 addObserver:self |
213 selector:@selector(bubbleWillClose:) | 213 selector:@selector(bubbleWillClose:) |
214 name:NSWindowWillCloseNotification | 214 name:NSWindowWillCloseNotification |
215 object:[menuController_ window]]; | 215 object:[menuController_ window]]; |
216 [menuController_ showWindow:self]; | 216 [menuController_ showWindow:self]; |
217 | 217 |
218 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE); | 218 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE); |
219 } | 219 } |
220 | 220 |
221 - (void)closeAvatarBubble { | |
222 [menuController_ close]; | |
223 } | |
224 | |
225 - (IBAction)buttonClicked:(id)sender { | 221 - (IBAction)buttonClicked:(id)sender { |
226 BrowserWindow::AvatarBubbleMode mode = | 222 BrowserWindow::AvatarBubbleMode mode = |
227 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT; | 223 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT; |
228 | 224 |
229 [self showAvatarBubbleAnchoredAt:button_ | 225 [self showAvatarBubbleAnchoredAt:button_ |
230 withMode:mode | 226 withMode:mode |
231 withServiceType:signin::GAIA_SERVICE_TYPE_NONE]; | 227 withServiceType:signin::GAIA_SERVICE_TYPE_NONE]; |
232 } | 228 } |
233 | 229 |
234 - (IBAction)buttonRightClicked:(id)sender { | 230 - (IBAction)buttonRightClicked:(id)sender { |
(...skipping 20 matching lines...) Expand all Loading... |
255 } | 251 } |
256 | 252 |
257 - (void)updateErrorStatus:(BOOL)hasError { | 253 - (void)updateErrorStatus:(BOOL)hasError { |
258 } | 254 } |
259 | 255 |
260 - (BaseBubbleController*)menuController { | 256 - (BaseBubbleController*)menuController { |
261 return menuController_; | 257 return menuController_; |
262 } | 258 } |
263 | 259 |
264 @end | 260 @end |
OLD | NEW |