| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 class ClickNotifyingWidget : public views::WidgetGtk { | 62 class ClickNotifyingWidget : public views::WidgetGtk { |
| 63 public: | 63 public: |
| 64 ClickNotifyingWidget(views::WidgetGtk::Type type, | 64 ClickNotifyingWidget(views::WidgetGtk::Type type, |
| 65 UserController* controller) | 65 UserController* controller) |
| 66 : WidgetGtk(type), | 66 : WidgetGtk(type), |
| 67 controller_(controller) { | 67 controller_(controller) { |
| 68 } | 68 } |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 gboolean OnButtonPress(GtkWidget* widget, GdkEventButton* event) { | 71 gboolean OnButtonPress(GtkWidget* widget, GdkEventButton* event) { |
| 72 if (!controller_->is_user_selected()) | 72 if (!controller_->IsUserSelected()) |
| 73 controller_->SelectUserRelative(0); | 73 controller_->SelectUserRelative(0); |
| 74 | 74 |
| 75 return views::WidgetGtk::OnButtonPress(widget, event); | 75 return views::WidgetGtk::OnButtonPress(widget, event); |
| 76 } | 76 } |
| 77 | 77 |
| 78 UserController* controller_; | 78 UserController* controller_; |
| 79 | 79 |
| 80 DISALLOW_COPY_AND_ASSIGN(ClickNotifyingWidget); | 80 DISALLOW_COPY_AND_ASSIGN(ClickNotifyingWidget); |
| 81 }; | 81 }; |
| 82 | 82 |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 return; | 509 return; |
| 510 } | 510 } |
| 511 delegate_->RemoveUser(this); | 511 delegate_->RemoveUser(this); |
| 512 } | 512 } |
| 513 | 513 |
| 514 void UserController::SelectUserRelative(int shift) { | 514 void UserController::SelectUserRelative(int shift) { |
| 515 delegate_->SelectUser(user_index() + shift); | 515 delegate_->SelectUser(user_index() + shift); |
| 516 } | 516 } |
| 517 | 517 |
| 518 } // namespace chromeos | 518 } // namespace chromeos |
| OLD | NEW |