| 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 #ifndef CHROME_BROWSER_UI_COCOA_PROFILES_AVATAR_MENU_BUBBLE_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_PROFILES_AVATAR_MENU_BUBBLE_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_PROFILES_AVATAR_MENU_BUBBLE_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_PROFILES_AVATAR_MENU_BUBBLE_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| 11 #include <memory> |
| 12 |
| 11 #include "base/mac/objc_property_releaser.h" | 13 #include "base/mac/objc_property_releaser.h" |
| 12 #include "base/mac/scoped_nsobject.h" | 14 #include "base/mac/scoped_nsobject.h" |
| 13 #include "base/memory/scoped_ptr.h" | |
| 14 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" | 15 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
| 15 #import "ui/base/cocoa/tracking_area.h" | 16 #import "ui/base/cocoa/tracking_area.h" |
| 16 | 17 |
| 17 class AvatarMenu; | 18 class AvatarMenu; |
| 18 class Browser; | 19 class Browser; |
| 19 | 20 |
| 20 // This window controller manages the bubble that displays a "menu" of profiles. | 21 // This window controller manages the bubble that displays a "menu" of profiles. |
| 21 // It is brought open by clicking on the avatar icon in the window frame. | 22 // It is brought open by clicking on the avatar icon in the window frame. |
| 22 @interface AvatarMenuBubbleController : BaseBubbleController { | 23 @interface AvatarMenuBubbleController : BaseBubbleController { |
| 23 @private | 24 @private |
| 24 // The menu that contains the data from the backend. | 25 // The menu that contains the data from the backend. |
| 25 scoped_ptr<AvatarMenu> menu_; | 26 std::unique_ptr<AvatarMenu> menu_; |
| 26 | 27 |
| 27 // Array of the below view controllers. | 28 // Array of the below view controllers. |
| 28 base::scoped_nsobject<NSMutableArray> items_; | 29 base::scoped_nsobject<NSMutableArray> items_; |
| 29 | 30 |
| 30 // Is set to true if the supervised user has clicked on Switch Users. | 31 // Is set to true if the supervised user has clicked on Switch Users. |
| 31 BOOL expanded_; | 32 BOOL expanded_; |
| 32 } | 33 } |
| 33 | 34 |
| 34 // Designated initializer. The browser is passed to the menu for profile | 35 // Designated initializer. The browser is passed to the menu for profile |
| 35 // information. | 36 // information. |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 anchoredAt:(NSPoint)point; | 138 anchoredAt:(NSPoint)point; |
| 138 - (void)performLayout; | 139 - (void)performLayout; |
| 139 - (NSMutableArray*)items; | 140 - (NSMutableArray*)items; |
| 140 @end | 141 @end |
| 141 | 142 |
| 142 @interface AvatarMenuItemController (ExposedForTesting) | 143 @interface AvatarMenuItemController (ExposedForTesting) |
| 143 - (void)willStartAnimation:(NSAnimation*)animation; | 144 - (void)willStartAnimation:(NSAnimation*)animation; |
| 144 @end | 145 @end |
| 145 | 146 |
| 146 #endif // CHROME_BROWSER_UI_COCOA_PROFILES_AVATAR_MENU_BUBBLE_CONTROLLER_H_ | 147 #endif // CHROME_BROWSER_UI_COCOA_PROFILES_AVATAR_MENU_BUBBLE_CONTROLLER_H_ |
| OLD | NEW |