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 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 layout->StartRow(1, 0); | 890 layout->StartRow(1, 0); |
890 layout->SkipColumns(1); | 891 layout->SkipColumns(1); |
891 | 892 |
892 layout->StartRow(1, 0); | 893 layout->StartRow(1, 0); |
893 layout->SkipColumns(1); | 894 layout->SkipColumns(1); |
894 return view; | 895 return view; |
895 } | 896 } |
896 | 897 |
897 views::View* ProfileChooserView::CreateGuestProfileView() { | 898 views::View* ProfileChooserView::CreateGuestProfileView() { |
898 gfx::Image guest_icon = | 899 gfx::Image guest_icon = |
899 ui::ResourceBundle::GetSharedInstance().GetImageNamed(IDR_LOGIN_GUEST); | 900 ui::ResourceBundle::GetSharedInstance().GetImageNamed( |
| 901 profiles::GetPlaceholderAvatarIconResourceID()); |
900 AvatarMenu::Item guest_avatar_item(0, 0, guest_icon); | 902 AvatarMenu::Item guest_avatar_item(0, 0, guest_icon); |
901 guest_avatar_item.active = true; | 903 guest_avatar_item.active = true; |
902 guest_avatar_item.name = l10n_util::GetStringUTF16( | 904 guest_avatar_item.name = l10n_util::GetStringUTF16( |
903 IDS_PROFILES_GUEST_PROFILE_NAME); | 905 IDS_PROFILES_GUEST_PROFILE_NAME); |
904 guest_avatar_item.signed_in = false; | 906 guest_avatar_item.signed_in = false; |
905 | 907 |
906 return CreateCurrentProfileView(guest_avatar_item, true); | 908 return CreateCurrentProfileView(guest_avatar_item, true); |
907 } | 909 } |
908 | 910 |
909 views::View* ProfileChooserView::CreateOtherProfilesView( | 911 views::View* ProfileChooserView::CreateOtherProfilesView( |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1166 | 1168 |
1167 views::View* ProfileChooserView::CreateNewProfileManagementPreviewView() { | 1169 views::View* ProfileChooserView::CreateNewProfileManagementPreviewView() { |
1168 return CreateTutorialView( | 1170 return CreateTutorialView( |
1169 l10n_util::GetStringUTF16(IDS_PROFILES_PREVIEW_TUTORIAL_TITLE), | 1171 l10n_util::GetStringUTF16(IDS_PROFILES_PREVIEW_TUTORIAL_TITLE), |
1170 l10n_util::GetStringUTF16(IDS_PROFILES_PREVIEW_TUTORIAL_CONTENT_TEXT), | 1172 l10n_util::GetStringUTF16(IDS_PROFILES_PREVIEW_TUTORIAL_CONTENT_TEXT), |
1171 l10n_util::GetStringUTF16(IDS_PROFILES_PROFILE_TUTORIAL_LEARN_MORE), | 1173 l10n_util::GetStringUTF16(IDS_PROFILES_PROFILE_TUTORIAL_LEARN_MORE), |
1172 l10n_util::GetStringUTF16(IDS_PROFILES_TUTORIAL_TRY_BUTTON), | 1174 l10n_util::GetStringUTF16(IDS_PROFILES_TUTORIAL_TRY_BUTTON), |
1173 &tutorial_learn_more_link_, | 1175 &tutorial_learn_more_link_, |
1174 &tutorial_enable_new_profile_management_button_); | 1176 &tutorial_enable_new_profile_management_button_); |
1175 } | 1177 } |
OLD | NEW |