| 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_card_view.h" | 5 #include "ash/system/user/user_card_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 | 286 |
| 287 UserCardView::UserCardView(LoginStatus login_status, int user_index) | 287 UserCardView::UserCardView(LoginStatus login_status, int user_index) |
| 288 : user_index_(user_index) { | 288 : user_index_(user_index) { |
| 289 auto* layout = new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, | 289 auto* layout = new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, |
| 290 kTrayPopupLabelHorizontalPadding); | 290 kTrayPopupLabelHorizontalPadding); |
| 291 SetLayoutManager(layout); | 291 SetLayoutManager(layout); |
| 292 layout->set_minimum_cross_axis_size(kTrayPopupItemMinHeight); | 292 layout->set_minimum_cross_axis_size(kTrayPopupItemMinHeight); |
| 293 layout->set_cross_axis_alignment( | 293 layout->set_cross_axis_alignment( |
| 294 views::BoxLayout::CROSS_AXIS_ALIGNMENT_CENTER); | 294 views::BoxLayout::CROSS_AXIS_ALIGNMENT_CENTER); |
| 295 | 295 |
| 296 set_background(views::Background::CreateSolidBackground(kBackgroundColor)); | 296 set_background(views::Background::CreateThemedSolidBackground( |
| 297 this, ui::NativeTheme::kColorId_BubbleBackground)); |
| 297 | 298 |
| 298 Shell::Get()->media_controller()->AddObserver(this); | 299 Shell::Get()->media_controller()->AddObserver(this); |
| 299 | 300 |
| 300 if (login_status == LoginStatus::PUBLIC) | 301 if (login_status == LoginStatus::PUBLIC) |
| 301 AddPublicModeUserContent(); | 302 AddPublicModeUserContent(); |
| 302 else | 303 else |
| 303 AddUserContent(layout, login_status); | 304 AddUserContent(layout, login_status); |
| 304 } | 305 } |
| 305 | 306 |
| 306 UserCardView::~UserCardView() { | 307 UserCardView::~UserCardView() { |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 media_capture_container_ = new views::View(); | 442 media_capture_container_ = new views::View(); |
| 442 media_capture_container_->SetLayoutManager(new views::FillLayout()); | 443 media_capture_container_->SetLayoutManager(new views::FillLayout()); |
| 443 media_capture_container_->AddChildView(media_capture_icon_); | 444 media_capture_container_->AddChildView(media_capture_icon_); |
| 444 AddChildView(media_capture_container_); | 445 AddChildView(media_capture_container_); |
| 445 | 446 |
| 446 Shell::Get()->media_controller()->RequestCaptureState(); | 447 Shell::Get()->media_controller()->RequestCaptureState(); |
| 447 } | 448 } |
| 448 | 449 |
| 449 } // namespace tray | 450 } // namespace tray |
| 450 } // namespace ash | 451 } // namespace ash |
| OLD | NEW |