| 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/wm_shelf_util.h" | 9 #include "ash/common/shelf/wm_shelf_util.h" |
| 10 #include "ash/common/system/chromeos/screen_security/screen_tray_item.h" | 10 #include "ash/common/system/chromeos/screen_security/screen_tray_item.h" |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 const base::string16& name = receiverActivity.receiver.name; | 508 const base::string16& name = receiverActivity.receiver.name; |
| 509 container->AddIconAndLabelCustomSize( | 509 container->AddIconAndLabelCustomSize( |
| 510 *image, name, false, kTrayPopupDetailsIconWidth, | 510 *image, name, false, kTrayPopupDetailsIconWidth, |
| 511 kTrayPopupPaddingHorizontal, kTrayPopupPaddingBetweenItems); | 511 kTrayPopupPaddingHorizontal, kTrayPopupPaddingBetweenItems); |
| 512 | 512 |
| 513 scroll_content()->AddChildView(container); | 513 scroll_content()->AddChildView(container); |
| 514 return container; | 514 return container; |
| 515 } | 515 } |
| 516 | 516 |
| 517 void CastDetailedView::AppendSettingsEntries() { | 517 void CastDetailedView::AppendSettingsEntries() { |
| 518 if (MaterialDesignController::IsSystemTrayMenuMaterial()) |
| 519 return; |
| 520 |
| 518 // 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. |
| 519 if (login_ == LoginStatus::NOT_LOGGED_IN || login_ == LoginStatus::LOCKED || | 522 if (login_ == LoginStatus::NOT_LOGGED_IN || login_ == LoginStatus::LOCKED || |
| 520 WmShell::Get()->GetSessionStateDelegate()->IsInSecondaryLoginScreen()) { | 523 WmShell::Get()->GetSessionStateDelegate()->IsInSecondaryLoginScreen()) { |
| 521 return; | 524 return; |
| 522 } | 525 } |
| 523 | 526 |
| 524 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 527 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 525 HoverHighlightView* container = new HoverHighlightView(this); | 528 HoverHighlightView* container = new HoverHighlightView(this); |
| 526 container->AddLabel(rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_CAST_OPTIONS), | 529 container->AddLabel(rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_CAST_OPTIONS), |
| 527 gfx::ALIGN_LEFT, false /* highlight */); | 530 gfx::ALIGN_LEFT, false /* highlight */); |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 is_casting_ = started; | 680 is_casting_ = started; |
| 678 UpdatePrimaryView(); | 681 UpdatePrimaryView(); |
| 679 } | 682 } |
| 680 | 683 |
| 681 void TrayCast::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { | 684 void TrayCast::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { |
| 682 if (tray_) | 685 if (tray_) |
| 683 tray_->UpdateAlignment(alignment); | 686 tray_->UpdateAlignment(alignment); |
| 684 } | 687 } |
| 685 | 688 |
| 686 } // namespace ash | 689 } // namespace ash |
| OLD | NEW |