Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: ash/system/user/user_card_view.cc

Issue 2838273002: Reland 097f9cde453ea57eb4aa037f44add782391c5eb9 (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/system/tray_accessibility.cc ('k') | ash/system/user/user_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/system/tray_accessibility.cc ('k') | ash/system/user/user_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698