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

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

Issue 2934503002: Remove references to ui/views/layout/layout_constants.h (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « chrome/browser/ui/views/login_view.cc ('k') | chrome/browser/ui/views/sad_tab_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/app/vector_icons/vector_icons.h" 10 #include "chrome/app/vector_icons/vector_icons.h"
(...skipping 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after
1501 1501
1502 view->SetBorder( 1502 view->SetBorder(
1503 views::CreateEmptyBorder(0, dialog_insets.left(), 1503 views::CreateEmptyBorder(0, dialog_insets.left(),
1504 dialog_insets.bottom(), dialog_insets.right())); 1504 dialog_insets.bottom(), dialog_insets.right()));
1505 1505
1506 const std::string& primary_account = SigninManagerFactory::GetForProfile( 1506 const std::string& primary_account = SigninManagerFactory::GetForProfile(
1507 browser_->profile())->GetAuthenticatedAccountId(); 1507 browser_->profile())->GetAuthenticatedAccountId();
1508 bool is_primary_account = primary_account == account_id_to_remove_; 1508 bool is_primary_account = primary_account == account_id_to_remove_;
1509 1509
1510 const int unrelated_vertical_spacing = 1510 const int unrelated_vertical_spacing =
1511 provider->GetDistanceMetric(DISTANCE_UNRELATED_CONTROL_VERTICAL); 1511 provider->GetDistanceMetric(views::DISTANCE_UNRELATED_CONTROL_VERTICAL);
1512 1512
1513 // Adds main text. 1513 // Adds main text.
1514 layout->StartRowWithPadding(1, 0, 0, unrelated_vertical_spacing); 1514 layout->StartRowWithPadding(1, 0, 0, unrelated_vertical_spacing);
1515 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); 1515 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
1516 const gfx::FontList& small_font_list = 1516 const gfx::FontList& small_font_list =
1517 rb->GetFontList(ui::ResourceBundle::SmallFont); 1517 rb->GetFontList(ui::ResourceBundle::SmallFont);
1518 1518
1519 if (is_primary_account) { 1519 if (is_primary_account) {
1520 std::string email = signin_ui_util::GetDisplayEmail(browser_->profile(), 1520 std::string email = signin_ui_util::GetDisplayEmail(browser_->profile(),
1521 account_id_to_remove_); 1521 account_id_to_remove_);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 views::ColumnSet* columns = layout->AddColumnSet(1); 1568 views::ColumnSet* columns = layout->AddColumnSet(1);
1569 gfx::Insets dialog_insets = provider->GetInsetsMetric( 1569 gfx::Insets dialog_insets = provider->GetInsetsMetric(
1570 views::INSETS_DIALOG_CONTENTS); 1570 views::INSETS_DIALOG_CONTENTS);
1571 columns->AddPaddingColumn(0, dialog_insets.left()); 1571 columns->AddPaddingColumn(0, dialog_insets.left());
1572 int label_width = kFixedSwitchUserViewWidth - dialog_insets.width(); 1572 int label_width = kFixedSwitchUserViewWidth - dialog_insets.width();
1573 columns->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 0, 1573 columns->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 0,
1574 views::GridLayout::FIXED, label_width, label_width); 1574 views::GridLayout::FIXED, label_width, label_width);
1575 columns->AddPaddingColumn(0, dialog_insets.right()); 1575 columns->AddPaddingColumn(0, dialog_insets.right());
1576 1576
1577 const int unrelated_vertical_spacing = 1577 const int unrelated_vertical_spacing =
1578 provider->GetDistanceMetric(DISTANCE_UNRELATED_CONTROL_VERTICAL); 1578 provider->GetDistanceMetric(views::DISTANCE_UNRELATED_CONTROL_VERTICAL);
1579 1579
1580 // Adds main text. 1580 // Adds main text.
1581 layout->StartRowWithPadding(1, 1, 0, unrelated_vertical_spacing); 1581 layout->StartRowWithPadding(1, 1, 0, unrelated_vertical_spacing);
1582 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); 1582 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
1583 const gfx::FontList& small_font_list = 1583 const gfx::FontList& small_font_list =
1584 rb->GetFontList(ui::ResourceBundle::SmallFont); 1584 rb->GetFontList(ui::ResourceBundle::SmallFont);
1585 const AvatarMenu::Item& avatar_item = 1585 const AvatarMenu::Item& avatar_item =
1586 avatar_menu_->GetItemAt(avatar_menu_->GetActiveProfileIndex()); 1586 avatar_menu_->GetItemAt(avatar_menu_->GetActiveProfileIndex());
1587 views::Label* content_label = new views::Label( 1587 views::Label* content_label = new views::Label(
1588 l10n_util::GetStringFUTF16( 1588 l10n_util::GetStringFUTF16(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1625 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 1625 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
1626 IncognitoModePrefs::DISABLED; 1626 IncognitoModePrefs::DISABLED;
1627 return incognito_available && !browser_->profile()->IsGuestSession(); 1627 return incognito_available && !browser_->profile()->IsGuestSession();
1628 } 1628 }
1629 1629
1630 void ProfileChooserView::PostActionPerformed( 1630 void ProfileChooserView::PostActionPerformed(
1631 ProfileMetrics::ProfileDesktopMenu action_performed) { 1631 ProfileMetrics::ProfileDesktopMenu action_performed) {
1632 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); 1632 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_);
1633 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; 1633 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE;
1634 } 1634 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/login_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