| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/tray/tray_popup_utils.h" | 5 #include "ash/common/system/tray/tray_popup_utils.h" |
| 6 | 6 |
| 7 #include "ash/common/ash_constants.h" | 7 #include "ash/common/ash_constants.h" |
| 8 #include "ash/common/ash_view_ids.h" | 8 #include "ash/common/ash_view_ids.h" |
| 9 #include "ash/common/material_design/material_design_controller.h" | 9 #include "ash/common/material_design/material_design_controller.h" |
| 10 #include "ash/common/session/session_state_delegate.h" | 10 #include "ash/common/session/session_state_delegate.h" |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 separator->SetBorder(views::CreateEmptyBorder( | 420 separator->SetBorder(views::CreateEmptyBorder( |
| 421 kMenuSeparatorVerticalPadding - kSeparatorWidth, | 421 kMenuSeparatorVerticalPadding - kSeparatorWidth, |
| 422 left_inset | 422 left_inset |
| 423 ? kMenuExtraMarginFromLeftEdge + kMenuButtonSize + | 423 ? kMenuExtraMarginFromLeftEdge + kMenuButtonSize + |
| 424 kTrayPopupLabelHorizontalPadding | 424 kTrayPopupLabelHorizontalPadding |
| 425 : 0, | 425 : 0, |
| 426 kMenuSeparatorVerticalPadding, 0)); | 426 kMenuSeparatorVerticalPadding, 0)); |
| 427 return separator; | 427 return separator; |
| 428 } | 428 } |
| 429 | 429 |
| 430 views::Separator* TrayPopupUtils::CreateListHeaderSeparator() { |
| 431 views::Separator* separator = |
| 432 new views::Separator(views::Separator::HORIZONTAL); |
| 433 separator->SetColor(kHorizontalSeparatorColor); |
| 434 separator->SetPreferredSize(kSeparatorWidth); |
| 435 separator->SetBorder(views::CreateEmptyBorder( |
| 436 kMenuSeparatorVerticalPadding - kSeparatorWidth, 0, 0, 0)); |
| 437 return separator; |
| 438 } |
| 439 |
| 430 bool TrayPopupUtils::CanOpenWebUISettings(LoginStatus status) { | 440 bool TrayPopupUtils::CanOpenWebUISettings(LoginStatus status) { |
| 431 // TODO(tdanderson): Consider moving this into WmShell, or introduce a | 441 // TODO(tdanderson): Consider moving this into WmShell, or introduce a |
| 432 // CanShowSettings() method in each delegate type that has a | 442 // CanShowSettings() method in each delegate type that has a |
| 433 // ShowSettings() method. | 443 // ShowSettings() method. |
| 434 return status != LoginStatus::NOT_LOGGED_IN && | 444 return status != LoginStatus::NOT_LOGGED_IN && |
| 435 status != LoginStatus::LOCKED && | 445 status != LoginStatus::LOCKED && |
| 436 !WmShell::Get()->GetSessionStateDelegate()->IsInSecondaryLoginScreen(); | 446 !WmShell::Get()->GetSessionStateDelegate()->IsInSecondaryLoginScreen(); |
| 437 } | 447 } |
| 438 | 448 |
| 439 } // namespace ash | 449 } // namespace ash |
| OLD | NEW |