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

Side by Side Diff: chrome/browser/chromeos/login/user_view.cc

Issue 8142026: Revert 104076 - Change std::wstring to string16 for views::Link (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chromeos/login/user_view.h" 5 #include "chrome/browser/chromeos/login/user_view.h"
6 6
7 #include <algorithm>
8
9 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/chromeos/login/helper.h" 8 #include "chrome/browser/chromeos/login/helper.h"
11 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" 9 #include "chrome/browser/chromeos/login/rounded_rect_painter.h"
12 #include "chrome/browser/chromeos/view_ids.h" 10 #include "chrome/browser/chromeos/view_ids.h"
13 #include "grit/generated_resources.h" 11 #include "grit/generated_resources.h"
14 #include "grit/theme_resources_standard.h" 12 #include "grit/theme_resources_standard.h"
15 #include "ui/base/l10n/l10n_util.h" 13 #include "ui/base/l10n/l10n_util.h"
16 #include "ui/base/resource/resource_bundle.h" 14 #include "ui/base/resource/resource_bundle.h"
17 #include "ui/gfx/canvas.h" 15 #include "ui/gfx/canvas.h"
18 #include "ui/gfx/canvas_skia.h" 16 #include "ui/gfx/canvas_skia.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 using login::kUserImageSize; 65 using login::kUserImageSize;
68 66
69 // The view that shows the Sign out button below the user's image. 67 // The view that shows the Sign out button below the user's image.
70 class SignoutView : public views::View { 68 class SignoutView : public views::View {
71 public: 69 public:
72 explicit SignoutView(views::LinkListener* link_listener) { 70 explicit SignoutView(views::LinkListener* link_listener) {
73 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 71 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
74 const gfx::Font& font = rb.GetFont(ResourceBundle::SmallFont); 72 const gfx::Font& font = rb.GetFont(ResourceBundle::SmallFont);
75 73
76 active_user_label_ = new views::Label( 74 active_user_label_ = new views::Label(
77 l10n_util::GetStringUTF16(IDS_SCREEN_LOCK_ACTIVE_USER)); 75 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SCREEN_LOCK_ACTIVE_USER)));
78 active_user_label_->SetFont(font); 76 active_user_label_->SetFont(font);
79 active_user_label_->SetColor(kTextColor); 77 active_user_label_->SetColor(kTextColor);
80 78
81 signout_link_ = new views::Link( 79 signout_link_ = new views::Link(
82 l10n_util::GetStringUTF16(IDS_SCREEN_LOCK_SIGN_OUT)); 80 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SCREEN_LOCK_SIGN_OUT)));
83 signout_link_->set_listener(link_listener); 81 signout_link_->set_listener(link_listener);
84 signout_link_->SetFont(font); 82 signout_link_->SetFont(font);
85 signout_link_->SetColor(kTextColor); 83 signout_link_->SetColor(kTextColor);
86 signout_link_->set_focusable(true); 84 signout_link_->set_focusable(true);
87 signout_link_->SetHighlightedColor(kTextColor); 85 signout_link_->SetHighlightedColor(kTextColor);
88 signout_link_->SetDisabledColor(kTextColor); 86 signout_link_->SetDisabledColor(kTextColor);
89 signout_link_->SetNormalColor(kTextColor); 87 signout_link_->SetNormalColor(kTextColor);
90 signout_link_->set_id(VIEW_ID_SCREEN_LOCKER_SIGNOUT_LINK); 88 signout_link_->set_id(VIEW_ID_SCREEN_LOCKER_SIGNOUT_LINK);
91 89
92 AddChildView(active_user_label_); 90 AddChildView(active_user_label_);
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 delegate_->OnRemoveUser(); 333 delegate_->OnRemoveUser();
336 } 334 }
337 335
338 void UserView::OnLocaleChanged() { 336 void UserView::OnLocaleChanged() {
339 remove_button_->SetText( 337 remove_button_->SetText(
340 UTF16ToWide(l10n_util::GetStringUTF16(IDS_LOGIN_REMOVE))); 338 UTF16ToWide(l10n_util::GetStringUTF16(IDS_LOGIN_REMOVE)));
341 delegate_->OnLocaleChanged(); 339 delegate_->OnLocaleChanged();
342 } 340 }
343 341
344 } // namespace chromeos 342 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_image_view.cc ('k') | chrome/browser/chromeos/login/username_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698