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