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 "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" |
11 #include "chrome/browser/profiles/profile_manager.h" | 11 #include "chrome/browser/profiles/profile_manager.h" |
12 #include "chrome/browser/profiles/profile_metrics.h" | 12 #include "chrome/browser/profiles/profile_metrics.h" |
13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
14 #include "chrome/browser/ui/browser_commands.h" | 14 #include "chrome/browser/ui/browser_commands.h" |
15 #include "chrome/browser/ui/browser_window.h" | 15 #include "chrome/browser/ui/browser_window.h" |
16 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" | 16 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
17 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 17 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
18 #import "chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller.h" | 18 #import "chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller.h" |
19 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" | 19 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" |
20 #include "chrome/common/profile_management_switches.h" | 20 #include "components/signin/core/common/profile_management_switches.h" |
21 #include "ui/base/resource/resource_bundle.h" | 21 #include "ui/base/resource/resource_bundle.h" |
22 | 22 |
23 // Space between the avatar icon and the avatar menu bubble. | 23 // Space between the avatar icon and the avatar menu bubble. |
24 const CGFloat kMenuYOffsetAdjust = 1.0; | 24 const CGFloat kMenuYOffsetAdjust = 1.0; |
25 | 25 |
26 @interface AvatarBaseController (Private) | 26 @interface AvatarBaseController (Private) |
27 // Shows the avatar bubble. | 27 // Shows the avatar bubble. |
28 - (IBAction)buttonClicked:(id)sender; | 28 - (IBAction)buttonClicked:(id)sender; |
29 - (void)bubbleWillClose:(NSNotification*)notif; | 29 - (void)bubbleWillClose:(NSNotification*)notif; |
30 // Updates the profile name displayed by the avatar button. If |layoutParent| is | 30 // Updates the profile name displayed by the avatar button. If |layoutParent| is |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 164 |
165 - (void)updateAvatarButtonAndLayoutParent:(BOOL)layoutParent { | 165 - (void)updateAvatarButtonAndLayoutParent:(BOOL)layoutParent { |
166 NOTREACHED(); | 166 NOTREACHED(); |
167 } | 167 } |
168 | 168 |
169 - (BaseBubbleController*)menuController { | 169 - (BaseBubbleController*)menuController { |
170 return menuController_; | 170 return menuController_; |
171 } | 171 } |
172 | 172 |
173 @end | 173 @end |
OLD | NEW |