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

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

Issue 3201003: Fixed error message bubbles according to the latest mocks (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Comments resolved Created 10 years, 4 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
« no previous file with comments | « chrome/browser/chromeos/login/user_controller.h ('k') | views/view.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) 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 WidgetGtk* window = new ClickNotifyingWidget(WidgetGtk::TYPE_WINDOW, this); 380 WidgetGtk* window = new ClickNotifyingWidget(WidgetGtk::TYPE_WINDOW, this);
381 ConfigureLoginWindow(window, 381 ConfigureLoginWindow(window,
382 index, 382 index,
383 gfx::Rect(0, 0, width, height), 383 gfx::Rect(0, 0, width, height),
384 type, 384 type,
385 label); 385 label);
386 return window; 386 return window;
387 } 387 }
388 388
389 gfx::Rect UserController::GetScreenBounds() const { 389 gfx::Rect UserController::GetScreenBounds() const {
390 if (is_guest_) { 390 if (is_guest_)
391 return new_user_view_->GetPasswordBounds(); 391 return new_user_view_->GetUsernameBounds();
392 } else { 392 else
393 gfx::Rect screen_bounds(existing_user_view_->password_field()->bounds()); 393 return existing_user_view_->password_field()->GetScreenBounds();
394 gfx::Point origin(screen_bounds.origin());
395 views::View::ConvertPointToScreen(
396 existing_user_view_->password_field()->GetParent(),
397 &origin);
398 screen_bounds.set_origin(origin);
399 return screen_bounds;
400 }
401 } 394 }
402 395
403 void UserController::OnLogin(const std::string& username, 396 void UserController::OnLogin(const std::string& username,
404 const std::string& password) { 397 const std::string& password) {
405 user_.set_email(username); 398 user_.set_email(username);
406 delegate_->Login(this, UTF8ToUTF16(password)); 399 delegate_->Login(this, UTF8ToUTF16(password));
407 } 400 }
408 401
409 void UserController::OnCreateAccount() { 402 void UserController::OnCreateAccount() {
410 delegate_->ActivateWizard(WizardController::kAccountScreenName); 403 delegate_->ActivateWizard(WizardController::kAccountScreenName);
(...skipping 21 matching lines...) Expand all
432 425
433 void UserController::SelectUser(int index) { 426 void UserController::SelectUser(int index) {
434 delegate_->SelectUser(index); 427 delegate_->SelectUser(index);
435 } 428 }
436 429
437 void UserController::FocusPasswordField() { 430 void UserController::FocusPasswordField() {
438 existing_user_view_->password_field()->RequestFocus(); 431 existing_user_view_->password_field()->RequestFocus();
439 } 432 }
440 433
441 } // namespace chromeos 434 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_controller.h ('k') | views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698