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_image_view.h" | 5 #include "chrome/browser/chromeos/login/user_image_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 skia::ImageOperations::Resize( | 140 skia::ImageOperations::Resize( |
141 *last_frame_, | 141 *last_frame_, |
142 skia::ImageOperations::RESIZE_LANCZOS3, | 142 skia::ImageOperations::RESIZE_LANCZOS3, |
143 kUserImageSize, | 143 kUserImageSize, |
144 kUserImageSize)); | 144 kUserImageSize)); |
145 image_selected_ = true; | 145 image_selected_ = true; |
146 ok_button_->SetEnabled(true); | 146 ok_button_->SetEnabled(true); |
147 ok_button_->RequestFocus(); | 147 ok_button_->RequestFocus(); |
148 } | 148 } |
149 | 149 |
150 void UserImageView::LocaleChanged() { | 150 void UserImageView::OnLocaleChanged() { |
151 UpdateLocalizedStrings(); | 151 UpdateLocalizedStrings(); |
152 Layout(); | 152 Layout(); |
153 } | 153 } |
154 | 154 |
155 void UserImageView::Layout() { | 155 void UserImageView::Layout() { |
156 gfx::Insets insets = GetInsets(); | 156 gfx::Insets insets = GetInsets(); |
157 | 157 |
158 // Place title at the top. | 158 // Place title at the top. |
159 int title_x = insets.left() + kHorizontalMargin; | 159 int title_x = insets.left() + kHorizontalMargin; |
160 int title_y = insets.top() + kVerticalMargin; | 160 int title_y = insets.top() + kVerticalMargin; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 if (sender == ok_button_) | 227 if (sender == ok_button_) |
228 delegate_->OnOK(selected_image_->GetImage()); | 228 delegate_->OnOK(selected_image_->GetImage()); |
229 else if (sender == cancel_button_) | 229 else if (sender == cancel_button_) |
230 delegate_->OnCancel(); | 230 delegate_->OnCancel(); |
231 else | 231 else |
232 NOTREACHED(); | 232 NOTREACHED(); |
233 } | 233 } |
234 | 234 |
235 } // namespace chromeos | 235 } // namespace chromeos |
236 | 236 |
OLD | NEW |