| 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 | 8 |
| 9 #include "ash/multi_profile_uma.h" | 9 #include "ash/multi_profile_uma.h" |
| 10 #include "ash/popup_message.h" | 10 #include "ash/popup_message.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 gfx::Size AddUserView::GetPreferredSize() const { | 167 gfx::Size AddUserView::GetPreferredSize() const { |
| 168 return owner_->bounds().size(); | 168 return owner_->bounds().size(); |
| 169 } | 169 } |
| 170 | 170 |
| 171 void AddUserView::AddContent() { | 171 void AddUserView::AddContent() { |
| 172 SetLayoutManager(new views::FillLayout()); | 172 SetLayoutManager(new views::FillLayout()); |
| 173 set_background(views::Background::CreateSolidBackground(kBackgroundColor)); | 173 set_background(views::Background::CreateSolidBackground(kBackgroundColor)); |
| 174 | 174 |
| 175 add_user_ = new views::View; | 175 add_user_ = new views::View; |
| 176 add_user_->SetBorder(views::Border::CreateEmptyBorder( | 176 add_user_->SetBorder(views::Border::CreateEmptyBorder( |
| 177 kTrayPopupUserCardVerticalPadding, | 177 0, kTrayUserTileHoverBorderInset, 0, 0)); |
| 178 kTrayPopupPaddingHorizontal - kTrayUserTileHoverBorderInset, | |
| 179 kTrayPopupUserCardVerticalPadding, | |
| 180 kTrayPopupPaddingHorizontal - kTrayUserTileHoverBorderInset)); | |
| 181 | 178 |
| 182 add_user_->SetLayoutManager(new views::BoxLayout( | 179 add_user_->SetLayoutManager(new views::BoxLayout( |
| 183 views::BoxLayout::kHorizontal, 0, 0, kTrayPopupPaddingBetweenItems)); | 180 views::BoxLayout::kHorizontal, 0, 0, kTrayPopupPaddingBetweenItems)); |
| 184 AddChildViewAt(add_user_, 0); | 181 AddChildViewAt(add_user_, 0); |
| 185 | 182 |
| 186 // Add the [+] icon which is also the anchor for messages. | 183 // Add the [+] icon which is also the anchor for messages. |
| 187 RoundedImageView* icon = new RoundedImageView(kTrayAvatarCornerRadius, true); | 184 RoundedImageView* icon = new RoundedImageView(kTrayAvatarCornerRadius, true); |
| 188 anchor_ = icon; | 185 anchor_ = icon; |
| 189 icon->SetImage(*ui::ResourceBundle::GetSharedInstance() | 186 icon->SetImage(*ui::ResourceBundle::GetSharedInstance() |
| 190 .GetImageNamed(IDR_AURA_UBER_TRAY_ADD_MULTIPROFILE_USER) | 187 .GetImageNamed(IDR_AURA_UBER_TRAY_ADD_MULTIPROFILE_USER) |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 focus_manager_ = NULL; | 544 focus_manager_ = NULL; |
| 548 if (user_card_view_->GetFocusManager()) | 545 if (user_card_view_->GetFocusManager()) |
| 549 user_card_view_->GetFocusManager()->ClearFocus(); | 546 user_card_view_->GetFocusManager()->ClearFocus(); |
| 550 popup_message_.reset(); | 547 popup_message_.reset(); |
| 551 mouse_watcher_.reset(); | 548 mouse_watcher_.reset(); |
| 552 add_menu_option_.reset(); | 549 add_menu_option_.reset(); |
| 553 } | 550 } |
| 554 | 551 |
| 555 } // namespace tray | 552 } // namespace tray |
| 556 } // namespace ash | 553 } // namespace ash |
| OLD | NEW |