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