| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/user_view.h" | 5 #include "ash/system/user/user_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> |
| 8 | 9 |
| 9 #include "ash/multi_profile_uma.h" | 10 #include "ash/multi_profile_uma.h" |
| 10 #include "ash/popup_message.h" | 11 #include "ash/popup_message.h" |
| 11 #include "ash/session/session_state_delegate.h" | 12 #include "ash/session/session_state_delegate.h" |
| 12 #include "ash/shell.h" | 13 #include "ash/shell.h" |
| 13 #include "ash/shell_delegate.h" | 14 #include "ash/shell_delegate.h" |
| 14 #include "ash/system/tray/system_tray.h" | 15 #include "ash/system/tray/system_tray.h" |
| 15 #include "ash/system/tray/system_tray_delegate.h" | 16 #include "ash/system/tray/system_tray_delegate.h" |
| 16 #include "ash/system/tray/tray_popup_label_button.h" | 17 #include "ash/system/tray/tray_popup_label_button.h" |
| 17 #include "ash/system/tray/tray_popup_label_button_border.h" | 18 #include "ash/system/tray/tray_popup_label_button_border.h" |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 views::Painter::CreateImageGridPainter( | 345 views::Painter::CreateImageGridPainter( |
| 345 kPublicAccountLogoutButtonBorderImagesNormal)); | 346 kPublicAccountLogoutButtonBorderImagesNormal)); |
| 346 border->SetPainter(false, | 347 border->SetPainter(false, |
| 347 views::Button::STATE_HOVERED, | 348 views::Button::STATE_HOVERED, |
| 348 views::Painter::CreateImageGridPainter( | 349 views::Painter::CreateImageGridPainter( |
| 349 kPublicAccountLogoutButtonBorderImagesHovered)); | 350 kPublicAccountLogoutButtonBorderImagesHovered)); |
| 350 border->SetPainter(false, | 351 border->SetPainter(false, |
| 351 views::Button::STATE_PRESSED, | 352 views::Button::STATE_PRESSED, |
| 352 views::Painter::CreateImageGridPainter( | 353 views::Painter::CreateImageGridPainter( |
| 353 kPublicAccountLogoutButtonBorderImagesHovered)); | 354 kPublicAccountLogoutButtonBorderImagesHovered)); |
| 354 logout_button_->SetBorder(border.Pass()); | 355 logout_button_->SetBorder(std::move(border)); |
| 355 } | 356 } |
| 356 AddChildView(logout_button_); | 357 AddChildView(logout_button_); |
| 357 } | 358 } |
| 358 | 359 |
| 359 void UserView::AddUserCard(user::LoginStatus login) { | 360 void UserView::AddUserCard(user::LoginStatus login) { |
| 360 // Add padding around the panel. | 361 // Add padding around the panel. |
| 361 SetBorder(views::Border::CreateEmptyBorder(kTrayPopupUserCardVerticalPadding, | 362 SetBorder(views::Border::CreateEmptyBorder(kTrayPopupUserCardVerticalPadding, |
| 362 kTrayPopupPaddingHorizontal, | 363 kTrayPopupPaddingHorizontal, |
| 363 kTrayPopupUserCardVerticalPadding, | 364 kTrayPopupUserCardVerticalPadding, |
| 364 kTrayPopupPaddingHorizontal)); | 365 kTrayPopupPaddingHorizontal)); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 focus_manager_ = NULL; | 520 focus_manager_ = NULL; |
| 520 if (user_card_view_->GetFocusManager()) | 521 if (user_card_view_->GetFocusManager()) |
| 521 user_card_view_->GetFocusManager()->ClearFocus(); | 522 user_card_view_->GetFocusManager()->ClearFocus(); |
| 522 popup_message_.reset(); | 523 popup_message_.reset(); |
| 523 mouse_watcher_.reset(); | 524 mouse_watcher_.reset(); |
| 524 add_menu_option_.reset(); | 525 add_menu_option_.reset(); |
| 525 } | 526 } |
| 526 | 527 |
| 527 } // namespace tray | 528 } // namespace tray |
| 528 } // namespace ash | 529 } // namespace ash |
| OLD | NEW |