| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/common/system/cast/tray_cast.h" | 5 #include "ash/common/system/cast/tray_cast.h" |
| 6 | 6 |
| 7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
| 8 #include "ash/common/session/session_state_delegate.h" | 8 #include "ash/common/session/session_state_delegate.h" |
| 9 #include "ash/common/shelf/shelf_types.h" | 9 #include "ash/common/shelf/shelf_types.h" |
| 10 #include "ash/common/shelf/wm_shelf_util.h" | 10 #include "ash/common/shelf/wm_shelf_util.h" |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 | 502 |
| 503 views::View* CastDetailedView::AddToReceiverList( | 503 views::View* CastDetailedView::AddToReceiverList( |
| 504 const CastConfigDelegate::ReceiverAndActivity& receiverActivity) { | 504 const CastConfigDelegate::ReceiverAndActivity& receiverActivity) { |
| 505 HoverHighlightView* container = new HoverHighlightView(this); | 505 HoverHighlightView* container = new HoverHighlightView(this); |
| 506 | 506 |
| 507 const gfx::ImageSkia* image = | 507 const gfx::ImageSkia* image = |
| 508 ui::ResourceBundle::GetSharedInstance() | 508 ui::ResourceBundle::GetSharedInstance() |
| 509 .GetImageNamed(IDR_AURA_UBER_TRAY_CAST_DEVICE_ICON) | 509 .GetImageNamed(IDR_AURA_UBER_TRAY_CAST_DEVICE_ICON) |
| 510 .ToImageSkia(); | 510 .ToImageSkia(); |
| 511 const base::string16& name = receiverActivity.receiver.name; | 511 const base::string16& name = receiverActivity.receiver.name; |
| 512 container->AddIndentedIconAndLabel(*image, name, false); | 512 container->AddIconAndLabelCustomSize( |
| 513 *image, name, false, kTrayPopupDetailsIconWidth, |
| 514 kTrayPopupPaddingHorizontal, kTrayPopupPaddingBetweenItems); |
| 513 | 515 |
| 514 scroll_content()->AddChildView(container); | 516 scroll_content()->AddChildView(container); |
| 515 return container; | 517 return container; |
| 516 } | 518 } |
| 517 | 519 |
| 518 void CastDetailedView::AppendSettingsEntries() { | 520 void CastDetailedView::AppendSettingsEntries() { |
| 519 // Settings requires a browser window, hide it for non logged in user. | 521 // Settings requires a browser window, hide it for non logged in user. |
| 520 if (login_ == LoginStatus::NOT_LOGGED_IN || login_ == LoginStatus::LOCKED || | 522 if (login_ == LoginStatus::NOT_LOGGED_IN || login_ == LoginStatus::LOCKED || |
| 521 WmShell::Get()->GetSessionStateDelegate()->IsInSecondaryLoginScreen()) { | 523 WmShell::Get()->GetSessionStateDelegate()->IsInSecondaryLoginScreen()) { |
| 522 return; | 524 return; |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 685 is_casting_ = started; | 687 is_casting_ = started; |
| 686 UpdatePrimaryView(); | 688 UpdatePrimaryView(); |
| 687 } | 689 } |
| 688 | 690 |
| 689 void TrayCast::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { | 691 void TrayCast::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { |
| 690 if (tray_) | 692 if (tray_) |
| 691 tray_->UpdateAlignment(alignment); | 693 tray_->UpdateAlignment(alignment); |
| 692 } | 694 } |
| 693 | 695 |
| 694 } // namespace ash | 696 } // namespace ash |
| OLD | NEW |