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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" | 7 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" |
8 | 8 |
9 #include "base/mac/bundle_locations.h" | 9 #include "base/mac/bundle_locations.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 | 1097 |
1098 [container addSubview:link]; | 1098 [container addSubview:link]; |
1099 [container setFrameSize:NSMakeSize( | 1099 [container setFrameSize:NSMakeSize( |
1100 NSMaxX([link frame]), NSMaxY([link frame]) + kSmallVerticalSpacing)]; | 1100 NSMaxX([link frame]), NSMaxY([link frame]) + kSmallVerticalSpacing)]; |
1101 return container.autorelease(); | 1101 return container.autorelease(); |
1102 } | 1102 } |
1103 | 1103 |
1104 - (NSView*)createGuestProfileView { | 1104 - (NSView*)createGuestProfileView { |
1105 gfx::Image guestIcon = | 1105 gfx::Image guestIcon = |
1106 ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( | 1106 ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( |
1107 IDR_LOGIN_GUEST); | 1107 profiles::GetPlaceholderAvatarIconResourceID()); |
1108 AvatarMenu::Item guestItem(std::string::npos, /* menu_index, not used */ | 1108 AvatarMenu::Item guestItem(std::string::npos, /* menu_index, not used */ |
1109 std::string::npos, /* profile_index, not used */ | 1109 std::string::npos, /* profile_index, not used */ |
1110 guestIcon); | 1110 guestIcon); |
1111 guestItem.active = true; | 1111 guestItem.active = true; |
1112 guestItem.name = base::SysNSStringToUTF16( | 1112 guestItem.name = base::SysNSStringToUTF16( |
1113 l10n_util::GetNSString(IDS_PROFILES_GUEST_PROFILE_NAME)); | 1113 l10n_util::GetNSString(IDS_PROFILES_GUEST_PROFILE_NAME)); |
1114 | 1114 |
1115 return [self createCurrentProfileView:guestItem]; | 1115 return [self createCurrentProfileView:guestItem]; |
1116 } | 1116 } |
1117 | 1117 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1432 [button setImage:ui::ResourceBundle::GetSharedInstance(). | 1432 [button setImage:ui::ResourceBundle::GetSharedInstance(). |
1433 GetNativeImageNamed(IDR_CLOSE_1).ToNSImage()]; | 1433 GetNativeImageNamed(IDR_CLOSE_1).ToNSImage()]; |
1434 [button setImagePosition:NSImageRight]; | 1434 [button setImagePosition:NSImageRight]; |
1435 [button setTarget:self]; | 1435 [button setTarget:self]; |
1436 [button setAction:@selector(showAccountRemovalView:)]; | 1436 [button setAction:@selector(showAccountRemovalView:)]; |
1437 | 1437 |
1438 return button.autorelease(); | 1438 return button.autorelease(); |
1439 } | 1439 } |
1440 | 1440 |
1441 @end | 1441 @end |
OLD | NEW |