Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 2299993005: Prepare some BlueButtons in chrome browser ui for switch to Harmony. (Closed)
Patch Set: restore include Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/macros.h" 7 #include "base/macros.h"
8 #include "base/metrics/user_metrics.h" 8 #include "base/metrics/user_metrics.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after
1650 if (signin_manager->IsSigninAllowed()) { 1650 if (signin_manager->IsSigninAllowed()) {
1651 views::Label* promo = new views::Label( 1651 views::Label* promo = new views::Label(
1652 l10n_util::GetStringUTF16(IDS_PROFILES_SIGNIN_PROMO)); 1652 l10n_util::GetStringUTF16(IDS_PROFILES_SIGNIN_PROMO));
1653 promo->SetMultiLine(true); 1653 promo->SetMultiLine(true);
1654 promo->SetHorizontalAlignment(gfx::ALIGN_LEFT); 1654 promo->SetHorizontalAlignment(gfx::ALIGN_LEFT);
1655 layout->StartRowWithPadding(1, 0, 0, 1655 layout->StartRowWithPadding(1, 0, 0,
1656 views::kRelatedControlSmallVerticalSpacing); 1656 views::kRelatedControlSmallVerticalSpacing);
1657 layout->StartRow(1, 0); 1657 layout->StartRow(1, 0);
1658 layout->AddView(promo); 1658 layout->AddView(promo);
1659 1659
1660 signin_current_profile_button_ = new views::BlueButton( 1660 signin_current_profile_button_ =
1661 this, l10n_util::GetStringFUTF16( 1661 views::MdTextButton::CreateSecondaryUiBlueButton(
1662 IDS_SYNC_START_SYNC_BUTTON_LABEL, 1662 this, l10n_util::GetStringFUTF16(
1663 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME))); 1663 IDS_SYNC_START_SYNC_BUTTON_LABEL,
1664 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)));
1664 layout->StartRowWithPadding(1, 0, 0, 1665 layout->StartRowWithPadding(1, 0, 0,
1665 views::kRelatedControlVerticalSpacing); 1666 views::kRelatedControlVerticalSpacing);
1666 layout->StartRow(1, 0); 1667 layout->StartRow(1, 0);
1667 layout->AddView(signin_current_profile_button_); 1668 layout->AddView(signin_current_profile_button_);
1668 content::RecordAction( 1669 content::RecordAction(
1669 base::UserMetricsAction("Signin_Impression_FromAvatarBubbleSignin")); 1670 base::UserMetricsAction("Signin_Impression_FromAvatarBubbleSignin"));
1670 } 1671 }
1671 } 1672 }
1672 1673
1673 return view; 1674 return view;
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
2146 views::Label* content_label = new views::Label( 2147 views::Label* content_label = new views::Label(
2147 l10n_util::GetStringUTF16(IDS_PROFILES_ACCOUNT_REMOVAL_TEXT)); 2148 l10n_util::GetStringUTF16(IDS_PROFILES_ACCOUNT_REMOVAL_TEXT));
2148 content_label->SetMultiLine(true); 2149 content_label->SetMultiLine(true);
2149 content_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); 2150 content_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
2150 content_label->SetFontList(small_font_list); 2151 content_label->SetFontList(small_font_list);
2151 layout->AddView(content_label); 2152 layout->AddView(content_label);
2152 } 2153 }
2153 2154
2154 // Adds button. 2155 // Adds button.
2155 if (!is_primary_account) { 2156 if (!is_primary_account) {
2156 remove_account_button_ = new views::BlueButton( 2157 remove_account_button_ = views::MdTextButton::CreateSecondaryUiBlueButton(
2157 this, l10n_util::GetStringUTF16(IDS_PROFILES_ACCOUNT_REMOVAL_BUTTON)); 2158 this, l10n_util::GetStringUTF16(IDS_PROFILES_ACCOUNT_REMOVAL_BUTTON));
2158 remove_account_button_->SetHorizontalAlignment( 2159 remove_account_button_->SetHorizontalAlignment(
2159 gfx::ALIGN_CENTER); 2160 gfx::ALIGN_CENTER);
2160 layout->StartRowWithPadding( 2161 layout->StartRowWithPadding(
2161 1, 0, 0, views::kUnrelatedControlVerticalSpacing); 2162 1, 0, 0, views::kUnrelatedControlVerticalSpacing);
2162 layout->AddView(remove_account_button_); 2163 layout->AddView(remove_account_button_);
2163 } else { 2164 } else {
2164 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); 2165 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing);
2165 } 2166 }
2166 2167
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
2303 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 2304 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
2304 IncognitoModePrefs::DISABLED; 2305 IncognitoModePrefs::DISABLED;
2305 return incognito_available && !browser_->profile()->IsGuestSession(); 2306 return incognito_available && !browser_->profile()->IsGuestSession();
2306 } 2307 }
2307 2308
2308 void ProfileChooserView::PostActionPerformed( 2309 void ProfileChooserView::PostActionPerformed(
2309 ProfileMetrics::ProfileDesktopMenu action_performed) { 2310 ProfileMetrics::ProfileDesktopMenu action_performed) {
2310 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); 2311 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_);
2311 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; 2312 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE;
2312 } 2313 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc ('k') | chrome/browser/ui/views/sad_tab_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698