| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/password_changed_view.h" | 5 #include "chrome/browser/chromeos/login/password_changed_view.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" | 8 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" |
| 9 #include "chrome/browser/chromeos/login/textfield_with_margin.h" | 9 #include "chrome/browser/chromeos/login/textfield_with_margin.h" |
| 10 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 views::View* PasswordChangedView::GetInitiallyFocusedView() { | 66 views::View* PasswordChangedView::GetInitiallyFocusedView() { |
| 67 DCHECK(old_password_field_); | 67 DCHECK(old_password_field_); |
| 68 return old_password_field_; | 68 return old_password_field_; |
| 69 } | 69 } |
| 70 | 70 |
| 71 ui::ModalType PasswordChangedView::GetModalType() const { | 71 ui::ModalType PasswordChangedView::GetModalType() const { |
| 72 return ui::MODAL_TYPE_SYSTEM; | 72 return ui::MODAL_TYPE_SYSTEM; |
| 73 } | 73 } |
| 74 | 74 |
| 75 views::View* PasswordChangedView::GetContentsView() { | |
| 76 return this; | |
| 77 } | |
| 78 | |
| 79 string16 PasswordChangedView::GetWindowTitle() const { | 75 string16 PasswordChangedView::GetWindowTitle() const { |
| 80 return l10n_util::GetStringUTF16( | 76 return l10n_util::GetStringUTF16( |
| 81 IDS_LOGIN_PASSWORD_CHANGED_DIALOG_BOX_TITLE); | 77 IDS_LOGIN_PASSWORD_CHANGED_DIALOG_BOX_TITLE); |
| 82 } | 78 } |
| 83 | 79 |
| 84 gfx::Size PasswordChangedView::GetPreferredSize() { | 80 gfx::Size PasswordChangedView::GetPreferredSize() { |
| 85 // TODO(nkostylev): Once UI is finalized, create locale settings. | 81 // TODO(nkostylev): Once UI is finalized, create locale settings. |
| 86 return gfx::Size(views::Widget::GetLocalizedContentsSize( | 82 return gfx::Size(views::Widget::GetLocalizedContentsSize( |
| 87 IDS_PASSWORD_CHANGED_DIALOG_WIDTH_CHARS, | 83 IDS_PASSWORD_CHANGED_DIALOG_WIDTH_CHARS, |
| 88 IDS_PASSWORD_CHANGED_DIALOG_HEIGHT_LINES)); | 84 IDS_PASSWORD_CHANGED_DIALOG_HEIGHT_LINES)); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 const string16& new_contents) { | 212 const string16& new_contents) { |
| 217 GetDialogClientView()->UpdateDialogButtons(); | 213 GetDialogClientView()->UpdateDialogButtons(); |
| 218 } | 214 } |
| 219 | 215 |
| 220 bool PasswordChangedView::HandleKeyEvent(views::Textfield* sender, | 216 bool PasswordChangedView::HandleKeyEvent(views::Textfield* sender, |
| 221 const ui::KeyEvent& keystroke) { | 217 const ui::KeyEvent& keystroke) { |
| 222 return false; | 218 return false; |
| 223 } | 219 } |
| 224 | 220 |
| 225 } // namespace chromeos | 221 } // namespace chromeos |
| OLD | NEW |