| 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 "ash/system/user/tray_user.h" | 5 #include "ash/system/user/tray_user.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/tray/system_tray_delegate.h" | 8 #include "ash/system/tray/system_tray_delegate.h" |
| 9 #include "ash/system/tray/tray_constants.h" | 9 #include "ash/system/tray/tray_constants.h" |
| 10 #include "ash/system/tray/tray_item_view.h" | 10 #include "ash/system/tray/tray_item_view.h" |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 label_->SetText(bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_GUEST_LABEL)); | 264 label_->SetText(bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_GUEST_LABEL)); |
| 265 SetupLabelForTray(label_); | 265 SetupLabelForTray(label_); |
| 266 } else { | 266 } else { |
| 267 avatar_ = new tray::RoundedImageView(kProfileRoundedCornerRadius); | 267 avatar_ = new tray::RoundedImageView(kProfileRoundedCornerRadius); |
| 268 } | 268 } |
| 269 UpdateAfterLoginStatusChange(status); | 269 UpdateAfterLoginStatusChange(status); |
| 270 return avatar_ ? static_cast<views::View*>(avatar_) | 270 return avatar_ ? static_cast<views::View*>(avatar_) |
| 271 : static_cast<views::View*>(label_); | 271 : static_cast<views::View*>(label_); |
| 272 } | 272 } |
| 273 | 273 |
| 274 views::View* TrayUser::CreateDefaultView(user::LoginStatus status) { | 274 views::View* TrayUser::CreateDefaultView(user::LoginStatus status, |
| 275 int bubble_width) { |
| 275 if (status == user::LOGGED_IN_NONE) | 276 if (status == user::LOGGED_IN_NONE) |
| 276 return NULL; | 277 return NULL; |
| 277 | 278 |
| 278 CHECK(user_ == NULL); | 279 CHECK(user_ == NULL); |
| 279 user_ = new tray::UserView(status); | 280 user_ = new tray::UserView(status); |
| 280 return user_; | 281 return user_; |
| 281 } | 282 } |
| 282 | 283 |
| 283 views::View* TrayUser::CreateDetailedView(user::LoginStatus status) { | 284 views::View* TrayUser::CreateDetailedView(user::LoginStatus status) { |
| 284 return NULL; | 285 return NULL; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 // Check for null to avoid crbug.com/150944. | 348 // Check for null to avoid crbug.com/150944. |
| 348 if (avatar_) { | 349 if (avatar_) { |
| 349 avatar_->SetImage( | 350 avatar_->SetImage( |
| 350 ash::Shell::GetInstance()->tray_delegate()->GetUserImage(), | 351 ash::Shell::GetInstance()->tray_delegate()->GetUserImage(), |
| 351 gfx::Size(kUserIconSize, kUserIconSize)); | 352 gfx::Size(kUserIconSize, kUserIconSize)); |
| 352 } | 353 } |
| 353 } | 354 } |
| 354 | 355 |
| 355 } // namespace internal | 356 } // namespace internal |
| 356 } // namespace ash | 357 } // namespace ash |
| OLD | NEW |