| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/avatar_menu_bubble_controller.h" | 5 #import "chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.h" |
| 6 | 6 |
| 7 #include "base/mac/mac_util.h" | 7 #include "base/mac/mac_util.h" |
| 8 #include "base/sys_string_conversions.h" | 8 #include "base/sys_string_conversions.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/profiles/avatar_menu_model.h" | 10 #include "chrome/browser/profiles/avatar_menu_model.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 } // namespace | 62 } // namespace |
| 63 | 63 |
| 64 @implementation AvatarMenuBubbleController | 64 @implementation AvatarMenuBubbleController |
| 65 | 65 |
| 66 - (id)initWithBrowser:(Browser*)parentBrowser | 66 - (id)initWithBrowser:(Browser*)parentBrowser |
| 67 anchoredAt:(NSPoint)point { | 67 anchoredAt:(NSPoint)point { |
| 68 | 68 |
| 69 AvatarMenuInternal::Bridge* bridge = new AvatarMenuInternal::Bridge(self); | 69 AvatarMenuInternal::Bridge* bridge = new AvatarMenuInternal::Bridge(self); |
| 70 AvatarMenuModel* model = new AvatarMenuModel( | 70 AvatarMenuModel* model = new AvatarMenuModel( |
| 71 &g_browser_process->profile_manager()->GetProfileInfoCache(), | 71 &g_browser_process->profile_manager()->GetProfileInfo(), |
| 72 bridge, parentBrowser); | 72 bridge, parentBrowser); |
| 73 | 73 |
| 74 if ((self = [self initWithModel:model | 74 if ((self = [self initWithModel:model |
| 75 bridge:bridge | 75 bridge:bridge |
| 76 parentWindow:parentBrowser->window()->GetNativeHandle() | 76 parentWindow:parentBrowser->window()->GetNativeHandle() |
| 77 anchoredAt:point])) { | 77 anchoredAt:point])) { |
| 78 } | 78 } |
| 79 return self; | 79 return self; |
| 80 } | 80 } |
| 81 | 81 |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 | 317 |
| 318 - (void)mouseDown:(id)sender { | 318 - (void)mouseDown:(id)sender { |
| 319 [viewController_ highlightForEventType:[[NSApp currentEvent] type]]; | 319 [viewController_ highlightForEventType:[[NSApp currentEvent] type]]; |
| 320 } | 320 } |
| 321 | 321 |
| 322 - (void)mouseUp:(id)sender { | 322 - (void)mouseUp:(id)sender { |
| 323 [viewController_ highlightForEventType:[[NSApp currentEvent] type]]; | 323 [viewController_ highlightForEventType:[[NSApp currentEvent] type]]; |
| 324 } | 324 } |
| 325 | 325 |
| 326 @end | 326 @end |
| OLD | NEW |