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

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: Merge conflicts resolved. 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
« no previous file with comments | « ash/system/tray/tray_constants.h ('k') | ash/system/user/user_accounts_delegate.h » ('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 "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/session/user_info.h" 10 #include "ash/session/user_info.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 secondary_account_row->AddColumn(views::GridLayout::FILL, 180 secondary_account_row->AddColumn(views::GridLayout::FILL,
181 views::GridLayout::BASELINE, 181 views::GridLayout::BASELINE,
182 0.0, 182 0.0,
183 views::GridLayout::USE_PREF, 183 views::GridLayout::USE_PREF,
184 0, 184 0,
185 0); 185 0);
186 186
187 // Adding primary account. 187 // Adding primary account.
188 layout->AddPaddingRow(0.0, kPaddingBetweenAccounts); 188 layout->AddPaddingRow(0.0, kPaddingBetweenAccounts);
189 layout->StartRow(0.0, kPrimaryAccountColumnSetID); 189 layout->StartRow(0.0, kPrimaryAccountColumnSetID);
190 const std::string& primary_account = delegate_->GetPrimaryAccount(); 190 const std::string& primary_account = delegate_->GetPrimaryAccountId();
191 views::Label* primary_account_label = 191 views::Label* primary_account_label =
192 new views::Label(l10n_util::GetStringFUTF16( 192 new views::Label(l10n_util::GetStringFUTF16(
193 IDS_ASH_STATUS_TRAY_PRIMARY_ACCOUNT_LABEL, 193 IDS_ASH_STATUS_TRAY_PRIMARY_ACCOUNT_LABEL,
194 base::ASCIIToUTF16( 194 base::ASCIIToUTF16(
195 delegate_->GetAccountDisplayName(primary_account)))); 195 delegate_->GetAccountDisplayName(primary_account))));
196 layout->AddView(primary_account_label); 196 layout->AddView(primary_account_label);
197 197
198 // Adding secondary accounts. 198 // Adding secondary accounts.
199 const std::vector<std::string>& secondary_accounts = 199 const std::vector<std::string>& secondary_accounts =
200 delegate_->GetSecondaryAccountsList(); 200 delegate_->GetSecondaryAccountIds();
201 for (size_t i = 0; i < secondary_accounts.size(); ++i) { 201 for (size_t i = 0; i < secondary_accounts.size(); ++i) {
202 layout->AddPaddingRow(0.0, kPaddingBetweenAccounts); 202 layout->AddPaddingRow(0.0, kPaddingBetweenAccounts);
203 layout->StartRow(0.0, kSecondaryAccountColumnSetID); 203 layout->StartRow(0.0, kSecondaryAccountColumnSetID);
204 const std::string& account_id = secondary_accounts[i]; 204 const std::string& account_id = secondary_accounts[i];
205 views::Label* account_label = new views::Label( 205 views::Label* account_label = new views::Label(
206 base::ASCIIToUTF16(delegate_->GetAccountDisplayName(account_id))); 206 base::ASCIIToUTF16(delegate_->GetAccountDisplayName(account_id)));
207 account_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); 207 account_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
208 layout->AddView(account_label); 208 layout->AddView(account_label);
209 views::View* delete_button = CreateDeleteButton(); 209 views::View* delete_button = CreateDeleteButton();
210 delete_button_to_account_id_[delete_button] = account_id; 210 delete_button_to_account_id_[delete_button] = account_id;
(...skipping 11 matching lines...) Expand all
222 rb.GetImageNamed(IDR_CLOSE_2).ToImageSkia()); 222 rb.GetImageNamed(IDR_CLOSE_2).ToImageSkia());
223 delete_button->SetImage(views::Button::STATE_HOVERED, 223 delete_button->SetImage(views::Button::STATE_HOVERED,
224 rb.GetImageNamed(IDR_CLOSE_2_H).ToImageSkia()); 224 rb.GetImageNamed(IDR_CLOSE_2_H).ToImageSkia());
225 delete_button->SetImage(views::Button::STATE_PRESSED, 225 delete_button->SetImage(views::Button::STATE_PRESSED,
226 rb.GetImageNamed(IDR_CLOSE_2_P).ToImageSkia()); 226 rb.GetImageNamed(IDR_CLOSE_2_P).ToImageSkia());
227 return delete_button; 227 return delete_button;
228 } 228 }
229 229
230 } // namespace tray 230 } // namespace tray
231 } // namespace ash 231 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/tray_constants.h ('k') | ash/system/user/user_accounts_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698