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

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

Issue 6452011: Rework tree APIs to reflect Google style and more const-correctness.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/shutdown_button.cc ('k') | chrome/browser/chromeos/login/wizard_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698