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 |
221 - (IBAction)buttonClicked:(id)sender { | 225 - (IBAction)buttonClicked:(id)sender { |
222 BrowserWindow::AvatarBubbleMode mode = | 226 BrowserWindow::AvatarBubbleMode mode = |
223 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT; | 227 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT; |
224 | 228 |
225 [self showAvatarBubbleAnchoredAt:button_ | 229 [self showAvatarBubbleAnchoredAt:button_ |
226 withMode:mode | 230 withMode:mode |
227 withServiceType:signin::GAIA_SERVICE_TYPE_NONE]; | 231 withServiceType:signin::GAIA_SERVICE_TYPE_NONE]; |
228 } | 232 } |
229 | 233 |
230 - (IBAction)buttonRightClicked:(id)sender { | 234 - (IBAction)buttonRightClicked:(id)sender { |
(...skipping 20 matching lines...) Expand all Loading... |
251 } | 255 } |
252 | 256 |
253 - (void)updateErrorStatus:(BOOL)hasError { | 257 - (void)updateErrorStatus:(BOOL)hasError { |
254 } | 258 } |
255 | 259 |
256 - (BaseBubbleController*)menuController { | 260 - (BaseBubbleController*)menuController { |
257 return menuController_; | 261 return menuController_; |
258 } | 262 } |
259 | 263 |
260 @end | 264 @end |
OLD | NEW |