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

Side by Side Diff: ash/system/user/accounts_detailed_view.cc

Issue 256623002: Implemented inline login dialog for Chrome OS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged SetExtraInitParams. Created 6 years, 7 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 | Annotate | Revision Log
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 "ash/system/user/accounts_detailed_view.h" 5 #include "ash/system/user/accounts_detailed_view.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/multi_profile_uma.h" 9 #include "ash/multi_profile_uma.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 secondary_account_row->AddColumn(views::GridLayout::FILL, 176 secondary_account_row->AddColumn(views::GridLayout::FILL,
177 views::GridLayout::BASELINE, 177 views::GridLayout::BASELINE,
178 0.0, 178 0.0,
179 views::GridLayout::USE_PREF, 179 views::GridLayout::USE_PREF,
180 0, 180 0,
181 0); 181 0);
182 182
183 // Adding primary account. 183 // Adding primary account.
184 layout->AddPaddingRow(0.0, kPaddingBetweenAccounts); 184 layout->AddPaddingRow(0.0, kPaddingBetweenAccounts);
185 layout->StartRow(0.0, kPrimaryAccountColumnSetID); 185 layout->StartRow(0.0, kPrimaryAccountColumnSetID);
186 const std::string& primary_account = delegate_->GetPrimaryAccount(); 186 const std::string& primary_account = delegate_->GetPrimaryAccountId();
187 views::Label* primary_account_label = 187 views::Label* primary_account_label =
188 new views::Label(l10n_util::GetStringFUTF16( 188 new views::Label(l10n_util::GetStringFUTF16(
189 IDS_ASH_STATUS_TRAY_PRIMARY_ACCOUNT_LABEL, 189 IDS_ASH_STATUS_TRAY_PRIMARY_ACCOUNT_LABEL,
190 base::ASCIIToUTF16( 190 base::ASCIIToUTF16(
191 delegate_->GetAccountDisplayName(primary_account)))); 191 delegate_->GetAccountDisplayName(primary_account))));
192 layout->AddView(primary_account_label); 192 layout->AddView(primary_account_label);
193 193
194 // Adding secondary accounts. 194 // Adding secondary accounts.
195 const std::vector<std::string>& secondary_accounts = 195 const std::vector<std::string>& secondary_accounts =
196 delegate_->GetSecondaryAccountsList(); 196 delegate_->GetSecondaryAccountIds();
197 for (size_t i = 0; i < secondary_accounts.size(); ++i) { 197 for (size_t i = 0; i < secondary_accounts.size(); ++i) {
198 layout->AddPaddingRow(0.0, kPaddingBetweenAccounts); 198 layout->AddPaddingRow(0.0, kPaddingBetweenAccounts);
199 layout->StartRow(0.0, kSecondaryAccountColumnSetID); 199 layout->StartRow(0.0, kSecondaryAccountColumnSetID);
200 const std::string& account_id = secondary_accounts[i]; 200 const std::string& account_id = secondary_accounts[i];
201 views::Label* account_label = new views::Label( 201 views::Label* account_label = new views::Label(
202 base::ASCIIToUTF16(delegate_->GetAccountDisplayName(account_id))); 202 base::ASCIIToUTF16(delegate_->GetAccountDisplayName(account_id)));
203 account_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); 203 account_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
204 layout->AddView(account_label); 204 layout->AddView(account_label);
205 views::View* delete_button = CreateDeleteButton(); 205 views::View* delete_button = CreateDeleteButton();
206 delete_button_to_account_id_[delete_button] = account_id; 206 delete_button_to_account_id_[delete_button] = account_id;
(...skipping 11 matching lines...) Expand all
218 rb.GetImageNamed(IDR_CLOSE_2).ToImageSkia()); 218 rb.GetImageNamed(IDR_CLOSE_2).ToImageSkia());
219 delete_button->SetImage(views::Button::STATE_HOVERED, 219 delete_button->SetImage(views::Button::STATE_HOVERED,
220 rb.GetImageNamed(IDR_CLOSE_2_H).ToImageSkia()); 220 rb.GetImageNamed(IDR_CLOSE_2_H).ToImageSkia());
221 delete_button->SetImage(views::Button::STATE_PRESSED, 221 delete_button->SetImage(views::Button::STATE_PRESSED,
222 rb.GetImageNamed(IDR_CLOSE_2_P).ToImageSkia()); 222 rb.GetImageNamed(IDR_CLOSE_2_P).ToImageSkia());
223 return delete_button; 223 return delete_button;
224 } 224 }
225 225
226 } // namespace tray 226 } // namespace tray
227 } // namespace ash 227 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698