| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_view.h" | 5 #include "chrome/browser/chromeos/login/user_view.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/chromeos/login/helper.h" | 8 #include "chrome/browser/chromeos/login/helper.h" |
| 9 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" | 9 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" |
| 10 #include "chrome/browser/chromeos/login/rounded_view.h" | 10 #include "chrome/browser/chromeos/login/rounded_view.h" |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 } | 194 } |
| 195 | 195 |
| 196 private: | 196 private: |
| 197 // Update button position and schedule paint event for the view and parent. | 197 // Update button position and schedule paint event for the view and parent. |
| 198 void UpdatePosition() { | 198 void UpdatePosition() { |
| 199 gfx::Size size = GetPreferredSize(); | 199 gfx::Size size = GetPreferredSize(); |
| 200 gfx::Point origin = top_right_; | 200 gfx::Point origin = top_right_; |
| 201 origin.Offset(-size.width(), 0); | 201 origin.Offset(-size.width(), 0); |
| 202 SetBoundsRect(gfx::Rect(origin, size)); | 202 SetBoundsRect(gfx::Rect(origin, size)); |
| 203 | 203 |
| 204 if (GetParent()) | 204 if (parent()) |
| 205 GetParent()->SchedulePaint(); | 205 parent()->SchedulePaint(); |
| 206 } | 206 } |
| 207 | 207 |
| 208 SkBitmap icon_; | 208 SkBitmap icon_; |
| 209 std::wstring text_; | 209 std::wstring text_; |
| 210 gfx::Point top_right_; | 210 gfx::Point top_right_; |
| 211 bool was_first_click_; | 211 bool was_first_click_; |
| 212 | 212 |
| 213 DISALLOW_COPY_AND_ASSIGN(RemoveButton); | 213 DISALLOW_COPY_AND_ASSIGN(RemoveButton); |
| 214 }; | 214 }; |
| 215 | 215 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 delegate_->OnRemoveUser(); | 338 delegate_->OnRemoveUser(); |
| 339 } | 339 } |
| 340 | 340 |
| 341 void UserView::OnLocaleChanged() { | 341 void UserView::OnLocaleChanged() { |
| 342 remove_button_->SetText( | 342 remove_button_->SetText( |
| 343 UTF16ToWide(l10n_util::GetStringUTF16(IDS_LOGIN_REMOVE))); | 343 UTF16ToWide(l10n_util::GetStringUTF16(IDS_LOGIN_REMOVE))); |
| 344 delegate_->OnLocaleChanged(); | 344 delegate_->OnLocaleChanged(); |
| 345 } | 345 } |
| 346 | 346 |
| 347 } // namespace chromeos | 347 } // namespace chromeos |
| OLD | NEW |