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/signin/signin_header_helper.h" | 13 #include "chrome/browser/signin/signin_header_helper.h" |
14 #include "chrome/browser/profiles/profiles_state.h" | 14 #include "chrome/browser/profiles/profiles_state.h" |
15 #include "chrome/browser/profiles/profile_window.h" | 15 #include "chrome/browser/profiles/profile_window.h" |
16 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
17 #include "chrome/browser/ui/browser_commands.h" | 17 #include "chrome/browser/ui/browser_commands.h" |
18 #include "chrome/browser/ui/browser_window.h" | 18 #include "chrome/browser/ui/browser_window.h" |
19 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" | 19 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
20 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 20 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
21 #import "chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller.h" | 21 #import "chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller.h" |
22 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" | 22 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" |
23 #include "components/signin/core/browser/signin_error_controller.h" | 23 #include "components/signin/core/browser/signin_error_controller.h" |
24 #include "components/signin/core/common/profile_management_switches.h" | 24 #include "components/signin/core/common/profile_management_switches.h" |
25 #include "ui/base/resource/resource_bundle.h" | |
26 | 25 |
27 // Space between the avatar icon and the avatar menu bubble. | 26 // Space between the avatar icon and the avatar menu bubble. |
28 const CGFloat kMenuYOffsetAdjust = 1.0; | 27 const CGFloat kMenuYOffsetAdjust = 1.0; |
29 // Offset needed to align the edge of the avatar bubble with the edge of the | 28 // Offset needed to align the edge of the avatar bubble with the edge of the |
30 // avatar button. | 29 // avatar button. |
31 const CGFloat kMenuXOffsetAdjust = 2.0; | 30 const CGFloat kMenuXOffsetAdjust = 2.0; |
32 | 31 |
33 @interface AvatarBaseController (Private) | 32 @interface AvatarBaseController (Private) |
34 // Shows the avatar bubble. | 33 // Shows the avatar bubble. |
35 - (IBAction)buttonClicked:(id)sender; | 34 - (IBAction)buttonClicked:(id)sender; |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 } | 210 } |
212 | 211 |
213 - (void)updateErrorStatus:(BOOL)hasError { | 212 - (void)updateErrorStatus:(BOOL)hasError { |
214 } | 213 } |
215 | 214 |
216 - (BaseBubbleController*)menuController { | 215 - (BaseBubbleController*)menuController { |
217 return menuController_; | 216 return menuController_; |
218 } | 217 } |
219 | 218 |
220 @end | 219 @end |
OLD | NEW |