| 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 "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #import "chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller.h" | 23 #import "chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller.h" |
| 24 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" | 24 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" |
| 25 #include "components/signin/core/browser/signin_error_controller.h" | 25 #include "components/signin/core/browser/signin_error_controller.h" |
| 26 #include "components/signin/core/common/profile_management_switches.h" | 26 #include "components/signin/core/common/profile_management_switches.h" |
| 27 #include "ui/base/cocoa/cocoa_base_utils.h" | 27 #include "ui/base/cocoa/cocoa_base_utils.h" |
| 28 | 28 |
| 29 // Space between the avatar icon and the avatar menu bubble. | 29 // Space between the avatar icon and the avatar menu bubble. |
| 30 const CGFloat kMenuYOffsetAdjust = 1.0; | 30 const CGFloat kMenuYOffsetAdjust = 1.0; |
| 31 // Offset needed to align the edge of the avatar bubble with the edge of the | 31 // Offset needed to align the edge of the avatar bubble with the edge of the |
| 32 // avatar button. | 32 // avatar button. |
| 33 const CGFloat kMenuXOffsetAdjust = 2.0; | 33 const CGFloat kMenuXOffsetAdjust = 1.0; |
| 34 | 34 |
| 35 @interface AvatarBaseController (Private) | 35 @interface AvatarBaseController (Private) |
| 36 // Shows the avatar bubble. | 36 // Shows the avatar bubble. |
| 37 - (IBAction)buttonClicked:(id)sender; | 37 - (IBAction)buttonClicked:(id)sender; |
| 38 - (IBAction)buttonRightClicked:(id)sender; | 38 - (IBAction)buttonRightClicked:(id)sender; |
| 39 | 39 |
| 40 - (void)bubbleWillClose:(NSNotification*)notif; | 40 - (void)bubbleWillClose:(NSNotification*)notif; |
| 41 | 41 |
| 42 // Updates the profile name displayed by the avatar button. If |layoutParent| is | 42 // Updates the profile name displayed by the avatar button. If |layoutParent| is |
| 43 // yes, then the BrowserWindowController is notified to relayout the subviews, | 43 // yes, then the BrowserWindowController is notified to relayout the subviews, |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 } | 256 } |
| 257 | 257 |
| 258 - (void)updateErrorStatus:(BOOL)hasError { | 258 - (void)updateErrorStatus:(BOOL)hasError { |
| 259 } | 259 } |
| 260 | 260 |
| 261 - (BaseBubbleController*)menuController { | 261 - (BaseBubbleController*)menuController { |
| 262 return menuController_; | 262 return menuController_; |
| 263 } | 263 } |
| 264 | 264 |
| 265 @end | 265 @end |
| OLD | NEW |