OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_controller.h" | 5 #include "chrome/browser/chromeos/login/user_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 namespace chromeos { | 41 namespace chromeos { |
42 | 42 |
43 namespace { | 43 namespace { |
44 | 44 |
45 // Gap between the border around the image/buttons and user name. | 45 // Gap between the border around the image/buttons and user name. |
46 const int kUserNameGap = 4; | 46 const int kUserNameGap = 4; |
47 | 47 |
48 // Approximate height of controls window, this constant is used in new user | 48 // Approximate height of controls window, this constant is used in new user |
49 // case to make border window size close to existing users. | 49 // case to make border window size close to existing users. |
| 50 #if defined(CROS_FONTS_USING_BCI) |
| 51 const int kControlsHeight = 31; |
| 52 #else |
50 const int kControlsHeight = 28; | 53 const int kControlsHeight = 28; |
51 | 54 #endif |
52 // Delta for the unselected username font. | |
53 const int kUnselectedUsernameFontDelta = 1; | |
54 | 55 |
55 // Widget that notifies window manager about clicking on itself. | 56 // Widget that notifies window manager about clicking on itself. |
56 // Doesn't send anything if user is selected. | 57 // Doesn't send anything if user is selected. |
57 class ClickNotifyingWidget : public views::WidgetGtk { | 58 class ClickNotifyingWidget : public views::WidgetGtk { |
58 public: | 59 public: |
59 ClickNotifyingWidget(views::WidgetGtk::Type type, | 60 ClickNotifyingWidget(views::WidgetGtk::Type type, |
60 UserController* controller) | 61 UserController* controller) |
61 : WidgetGtk(type), | 62 : WidgetGtk(type), |
62 controller_(controller) { | 63 controller_(controller) { |
63 } | 64 } |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 | 519 |
519 void UserController::SelectUser(int index) { | 520 void UserController::SelectUser(int index) { |
520 delegate_->SelectUser(index); | 521 delegate_->SelectUser(index); |
521 } | 522 } |
522 | 523 |
523 void UserController::FocusPasswordField() { | 524 void UserController::FocusPasswordField() { |
524 existing_user_view_->FocusPasswordField(); | 525 existing_user_view_->FocusPasswordField(); |
525 } | 526 } |
526 | 527 |
527 } // namespace chromeos | 528 } // namespace chromeos |
OLD | NEW |