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/profile_chooser_controller.h" | 5 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" |
6 | 6 |
7 #import <Carbon/Carbon.h> // kVK_Return. | 7 #import <Carbon/Carbon.h> // kVK_Return. |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/mac/bundle_locations.h" | 10 #include "base/mac/bundle_locations.h" |
(...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1878 [container addSubview:disclaimer]; | 1878 [container addSubview:disclaimer]; |
1879 [container setFrameSize:NSMakeSize(kFixedMenuWidth, yOffset)]; | 1879 [container setFrameSize:NSMakeSize(kFixedMenuWidth, yOffset)]; |
1880 return container.autorelease(); | 1880 return container.autorelease(); |
1881 } | 1881 } |
1882 | 1882 |
1883 - (NSView*)createGuestProfileView { | 1883 - (NSView*)createGuestProfileView { |
1884 gfx::Image guestIcon = | 1884 gfx::Image guestIcon = |
1885 ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( | 1885 ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( |
1886 profiles::GetPlaceholderAvatarIconResourceID()); | 1886 profiles::GetPlaceholderAvatarIconResourceID()); |
1887 AvatarMenu::Item guestItem(std::string::npos, /* menu_index, not used */ | 1887 AvatarMenu::Item guestItem(std::string::npos, /* menu_index, not used */ |
1888 std::string::npos, /* profile_index, not used */ | |
1889 guestIcon); | 1888 guestIcon); |
1890 guestItem.active = true; | 1889 guestItem.active = true; |
1891 guestItem.name = base::SysNSStringToUTF16( | 1890 guestItem.name = base::SysNSStringToUTF16( |
1892 l10n_util::GetNSString(IDS_PROFILES_GUEST_PROFILE_NAME)); | 1891 l10n_util::GetNSString(IDS_PROFILES_GUEST_PROFILE_NAME)); |
1893 | 1892 |
1894 return [self createCurrentProfileView:guestItem]; | 1893 return [self createCurrentProfileView:guestItem]; |
1895 } | 1894 } |
1896 | 1895 |
1897 - (NSButton*)createOtherProfileView:(int)itemIndex { | 1896 - (NSButton*)createOtherProfileView:(int)itemIndex { |
1898 const AvatarMenu::Item& item = avatarMenu_->GetItemAt(itemIndex); | 1897 const AvatarMenu::Item& item = avatarMenu_->GetItemAt(itemIndex); |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2407 } | 2406 } |
2408 | 2407 |
2409 - (bool)shouldShowGoIncognito { | 2408 - (bool)shouldShowGoIncognito { |
2410 bool incognitoAvailable = | 2409 bool incognitoAvailable = |
2411 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 2410 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |
2412 IncognitoModePrefs::DISABLED; | 2411 IncognitoModePrefs::DISABLED; |
2413 return incognitoAvailable && !browser_->profile()->IsGuestSession(); | 2412 return incognitoAvailable && !browser_->profile()->IsGuestSession(); |
2414 } | 2413 } |
2415 | 2414 |
2416 @end | 2415 @end |
OLD | NEW |