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 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h" | 5 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h" |
6 | 6 |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/lifetime/application_lifetime.h" | 10 #include "chrome/browser/lifetime/application_lifetime.h" |
11 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 11 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
| 12 #include "chrome/browser/profiles/profile_info_cache.h" |
12 #include "chrome/browser/profiles/profile_manager.h" | 13 #include "chrome/browser/profiles/profile_manager.h" |
13 #include "chrome/browser/profiles/profile_window.h" | 14 #include "chrome/browser/profiles/profile_window.h" |
14 #include "chrome/browser/profiles/profiles_state.h" | 15 #include "chrome/browser/profiles/profiles_state.h" |
15 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 16 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
16 #include "chrome/browser/signin/signin_manager_factory.h" | 17 #include "chrome/browser/signin/signin_manager_factory.h" |
17 #include "chrome/browser/signin/signin_promo.h" | 18 #include "chrome/browser/signin/signin_promo.h" |
18 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
19 #include "chrome/browser/ui/browser_dialogs.h" | 20 #include "chrome/browser/ui/browser_dialogs.h" |
20 #include "chrome/browser/ui/chrome_pages.h" | 21 #include "chrome/browser/ui/chrome_pages.h" |
21 #include "chrome/browser/ui/singleton_tabs.h" | 22 #include "chrome/browser/ui/singleton_tabs.h" |
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 layout->StartRow(1, 0); | 860 layout->StartRow(1, 0); |
860 layout->SkipColumns(1); | 861 layout->SkipColumns(1); |
861 | 862 |
862 layout->StartRow(1, 0); | 863 layout->StartRow(1, 0); |
863 layout->SkipColumns(1); | 864 layout->SkipColumns(1); |
864 return view; | 865 return view; |
865 } | 866 } |
866 | 867 |
867 views::View* ProfileChooserView::CreateGuestProfileView() { | 868 views::View* ProfileChooserView::CreateGuestProfileView() { |
868 gfx::Image guest_icon = | 869 gfx::Image guest_icon = |
869 ui::ResourceBundle::GetSharedInstance().GetImageNamed(IDR_LOGIN_GUEST); | 870 ui::ResourceBundle::GetSharedInstance().GetImageNamed( |
| 871 profiles::GetPlaceholderAvatarIconResourceID()); |
870 AvatarMenu::Item guest_avatar_item(0, 0, guest_icon); | 872 AvatarMenu::Item guest_avatar_item(0, 0, guest_icon); |
871 guest_avatar_item.active = true; | 873 guest_avatar_item.active = true; |
872 guest_avatar_item.name = l10n_util::GetStringUTF16( | 874 guest_avatar_item.name = l10n_util::GetStringUTF16( |
873 IDS_PROFILES_GUEST_PROFILE_NAME); | 875 IDS_PROFILES_GUEST_PROFILE_NAME); |
874 guest_avatar_item.signed_in = false; | 876 guest_avatar_item.signed_in = false; |
875 | 877 |
876 return CreateCurrentProfileView(guest_avatar_item, true); | 878 return CreateCurrentProfileView(guest_avatar_item, true); |
877 } | 879 } |
878 | 880 |
879 views::View* ProfileChooserView::CreateOtherProfilesView( | 881 views::View* ProfileChooserView::CreateOtherProfilesView( |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1126 gfx::ALIGN_CENTER); | 1128 gfx::ALIGN_CENTER); |
1127 layout->StartRowWithPadding( | 1129 layout->StartRowWithPadding( |
1128 1, 0, 0, views::kUnrelatedControlVerticalSpacing); | 1130 1, 0, 0, views::kUnrelatedControlVerticalSpacing); |
1129 layout->AddView(remove_account_and_relaunch_button_); | 1131 layout->AddView(remove_account_and_relaunch_button_); |
1130 } else { | 1132 } else { |
1131 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); | 1133 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); |
1132 } | 1134 } |
1133 | 1135 |
1134 return view; | 1136 return view; |
1135 } | 1137 } |
OLD | NEW |