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

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

Issue 6329016: Screen Locker fixes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 11 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 | « chrome/browser/chromeos/login/shutdown_button.cc ('k') | chrome/browser/chromeos/view_ids.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 (c) 2010 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 "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/chromeos/login/helper.h" 8 #include "chrome/browser/chromeos/login/helper.h"
9 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" 9 #include "chrome/browser/chromeos/login/rounded_rect_painter.h"
10 #include "chrome/browser/chromeos/login/rounded_view.h" 10 #include "chrome/browser/chromeos/login/rounded_view.h"
11 #include "chrome/browser/chromeos/view_ids.h"
11 #include "gfx/canvas.h" 12 #include "gfx/canvas.h"
12 #include "gfx/canvas_skia.h" 13 #include "gfx/canvas_skia.h"
13 #include "gfx/gtk_util.h" 14 #include "gfx/gtk_util.h"
14 #include "gfx/rect.h" 15 #include "gfx/rect.h"
15 #include "grit/generated_resources.h" 16 #include "grit/generated_resources.h"
16 #include "grit/theme_resources.h" 17 #include "grit/theme_resources.h"
17 #include "ui/base/l10n/l10n_util.h" 18 #include "ui/base/l10n/l10n_util.h"
18 #include "ui/base/resource/resource_bundle.h" 19 #include "ui/base/resource/resource_bundle.h"
19 #include "views/background.h" 20 #include "views/background.h"
20 #include "views/controls/button/text_button.h" 21 #include "views/controls/button/text_button.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SCREEN_LOCK_ACTIVE_USER))); 80 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SCREEN_LOCK_ACTIVE_USER)));
80 active_user_label_->SetFont(font); 81 active_user_label_->SetFont(font);
81 active_user_label_->SetColor(kTextColor); 82 active_user_label_->SetColor(kTextColor);
82 83
83 signout_link_ = new views::Link( 84 signout_link_ = new views::Link(
84 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SCREEN_LOCK_SIGN_OUT))); 85 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SCREEN_LOCK_SIGN_OUT)));
85 signout_link_->SetController(link_controller); 86 signout_link_->SetController(link_controller);
86 signout_link_->SetFont(font); 87 signout_link_->SetFont(font);
87 signout_link_->SetColor(kTextColor); 88 signout_link_->SetColor(kTextColor);
88 signout_link_->SetFocusable(true); 89 signout_link_->SetFocusable(true);
90 signout_link_->SetHighlightedColor(kTextColor);
91 signout_link_->SetDisabledColor(kTextColor);
92 signout_link_->SetNormalColor(kTextColor);
93 signout_link_->SetID(VIEW_ID_SCREEN_LOCKER_SIGNOUT_LINK);
89 94
90 AddChildView(active_user_label_); 95 AddChildView(active_user_label_);
91 AddChildView(signout_link_); 96 AddChildView(signout_link_);
92 97
93 set_background(views::Background::CreateBackgroundPainter( 98 set_background(views::Background::CreateBackgroundPainter(
94 true, new SignoutBackgroundPainter())); 99 true, new SignoutBackgroundPainter()));
95 } 100 }
96 101
97 // views::View overrides. 102 // views::View overrides.
98 virtual void Layout() { 103 virtual void Layout() {
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 if (remove_button_ == sender) 339 if (remove_button_ == sender)
335 delegate_->OnRemoveUser(); 340 delegate_->OnRemoveUser();
336 } 341 }
337 342
338 void UserView::OnLocaleChanged() { 343 void UserView::OnLocaleChanged() {
339 remove_button_->SetText( 344 remove_button_->SetText(
340 UTF16ToWide(l10n_util::GetStringUTF16(IDS_LOGIN_REMOVE))); 345 UTF16ToWide(l10n_util::GetStringUTF16(IDS_LOGIN_REMOVE)));
341 } 346 }
342 347
343 } // namespace chromeos 348 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/shutdown_button.cc ('k') | chrome/browser/chromeos/view_ids.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698