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

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

Issue 2556833002: Make LabelButton::SetFontList protected. (Closed)
Patch Set: update test Created 4 years 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 527
528 profile_name_textfield_ = new views::Textfield(); 528 profile_name_textfield_ = new views::Textfield();
529 // Textfield that overlaps the button. 529 // Textfield that overlaps the button.
530 profile_name_textfield_->set_controller(controller); 530 profile_name_textfield_->set_controller(controller);
531 profile_name_textfield_->SetFontList(medium_font_list); 531 profile_name_textfield_->SetFontList(medium_font_list);
532 profile_name_textfield_->SetHorizontalAlignment(gfx::ALIGN_CENTER); 532 profile_name_textfield_->SetHorizontalAlignment(gfx::ALIGN_CENTER);
533 profile_name_textfield_->SetVisible(false); 533 profile_name_textfield_->SetVisible(false);
534 AddChildView(profile_name_textfield_); 534 AddChildView(profile_name_textfield_);
535 535
536 button_ = new RightAlignedIconLabelButton(this, text); 536 button_ = new RightAlignedIconLabelButton(this, text);
537 button_->SetFontList(medium_font_list); 537 button_->SetFontListDeprecated(medium_font_list);
538 // Show an "edit" pencil icon when hovering over. In the default state, 538 // Show an "edit" pencil icon when hovering over. In the default state,
539 // we need to create an empty placeholder of the correct size, so that 539 // we need to create an empty placeholder of the correct size, so that
540 // the text doesn't jump around when the hovered icon appears. 540 // the text doesn't jump around when the hovered icon appears.
541 // TODO(estade): revisit colors and press effect. 541 // TODO(estade): revisit colors and press effect.
542 const int kIconSize = 16; 542 const int kIconSize = 16;
543 button_->SetImage(views::LabelButton::STATE_NORMAL, 543 button_->SetImage(views::LabelButton::STATE_NORMAL,
544 CreateSquarePlaceholderImage(kIconSize)); 544 CreateSquarePlaceholderImage(kIconSize));
545 button_->SetImage(views::LabelButton::STATE_HOVERED, 545 button_->SetImage(views::LabelButton::STATE_HOVERED,
546 gfx::CreateVectorIcon( 546 gfx::CreateVectorIcon(
547 gfx::VectorIconId::MODE_EDIT, kIconSize, 547 gfx::VectorIconId::MODE_EDIT, kIconSize,
(...skipping 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after
2311 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 2311 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
2312 IncognitoModePrefs::DISABLED; 2312 IncognitoModePrefs::DISABLED;
2313 return incognito_available && !browser_->profile()->IsGuestSession(); 2313 return incognito_available && !browser_->profile()->IsGuestSession();
2314 } 2314 }
2315 2315
2316 void ProfileChooserView::PostActionPerformed( 2316 void ProfileChooserView::PostActionPerformed(
2317 ProfileMetrics::ProfileDesktopMenu action_performed) { 2317 ProfileMetrics::ProfileDesktopMenu action_performed) {
2318 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); 2318 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_);
2319 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; 2319 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE;
2320 } 2320 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/profiles/new_avatar_button.cc ('k') | ui/views/controls/button/label_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698