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

Unified Diff: chrome/browser/chromeos/login/guest_user_view.cc

Issue 5709001: Place the spinner in the right corner of the controls window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/chromeos/login
Patch Set: nits Created 10 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/guest_user_view.h ('k') | chrome/browser/chromeos/login/helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/guest_user_view.cc
diff --git a/chrome/browser/chromeos/login/guest_user_view.cc b/chrome/browser/chromeos/login/guest_user_view.cc
index a06e01785ced6a601a4192b4b40fb8167633d3c6..049879d5f3c89aea4e6794dfc65a34bbb78afb3e 100644
--- a/chrome/browser/chromeos/login/guest_user_view.cc
+++ b/chrome/browser/chromeos/login/guest_user_view.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/chromeos/login/guest_user_view.h"
#include "app/l10n_util.h"
-#include "chrome/browser/chromeos/login/helper.h"
#include "chrome/browser/chromeos/login/user_controller.h"
#include "chrome/browser/chromeos/login/wizard_accessibility_helper.h"
#include "grit/generated_resources.h"
@@ -15,16 +14,16 @@ namespace chromeos {
// Button with custom processing for Tab/Shift+Tab to select entries.
class UserEntryButton : public login::WideButton {
public:
- UserEntryButton(UserController* controller,
+ UserEntryButton(views::ButtonListener* button_listener,
+ UserController* user_controller,
const std::wstring& label)
- : WideButton(controller, label),
- controller_(controller) {}
+ : WideButton(button_listener, label),
+ user_controller_(user_controller) {}
// Overridden from views::View:
virtual bool OnKeyPressed(const views::KeyEvent& e) {
if (e.GetKeyCode() == app::VKEY_TAB) {
- int index = controller_->user_index() + (e.IsShiftDown() ? -1 : 1);
- controller_->SelectUser(index);
+ user_controller_->SelectUserRelative(e.IsShiftDown() ? -1 : 1);
return true;
}
return WideButton::OnKeyPressed(e);
@@ -37,7 +36,7 @@ class UserEntryButton : public login::WideButton {
}
private:
- UserController* controller_;
+ UserController* user_controller_;
DISALLOW_COPY_AND_ASSIGN(UserEntryButton);
};
@@ -63,6 +62,7 @@ GuestUserView::GuestUserView(UserController* uc)
void GuestUserView::RecreateFields() {
delete submit_button_;
submit_button_ = new UserEntryButton(
+ this,
user_controller_,
l10n_util::GetString(IDS_ENTER_GUEST_SESSION_BUTTON));
AddChildView(submit_button_);
@@ -71,8 +71,7 @@ void GuestUserView::RecreateFields() {
}
void GuestUserView::FocusSignInButton() {
- if (GetFocusManager())
- submit_button_->RequestFocus();
+ submit_button_->RequestFocus();
}
bool GuestUserView::AcceleratorPressed(
@@ -82,14 +81,24 @@ bool GuestUserView::AcceleratorPressed(
else if (accelerator == accel_enable_accessibility_)
WizardAccessibilityHelper::GetInstance()->EnableAccessibility(this);
else if (accelerator == accel_previous_pod_by_arrow_)
- user_controller_->SelectUser(user_controller_->user_index() - 1);
+ user_controller_->SelectUserRelative(-1);
else if (accelerator == accel_next_pod_by_arrow_)
- user_controller_->SelectUser(user_controller_->user_index() + 1);
+ user_controller_->SelectUserRelative(1);
else
return false;
return true;
}
+void GuestUserView::ButtonPressed(
+ views::Button* sender, const views::Event& event) {
+ DCHECK(sender == submit_button_);
+ user_controller_->OnLoginOffTheRecord();
+}
+
+void GuestUserView::EnableInputControls(bool enabled) {
+ submit_button_->SetEnabled(enabled);
+}
+
void GuestUserView::ViewHierarchyChanged(bool is_add,
views::View* parent,
views::View* child) {
@@ -111,4 +120,15 @@ void GuestUserView::Layout() {
submit_button_size.height());
}
+void GuestUserView::ClearAndFocusControls() {
+}
+
+void GuestUserView::ClearAndFocusPassword() {
+}
+
+gfx::Rect GuestUserView::GetMainInputScreenBounds() const {
+ NOTREACHED();
+ return gfx::Rect();
+}
+
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/login/guest_user_view.h ('k') | chrome/browser/chromeos/login/helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698