| 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/overview/overview_button_tray.h" | 5 #include "ash/system/overview/overview_button_tray.h" |
| 6 | 6 |
| 7 #include "ash/session/session_state_delegate.h" | 7 #include "ash/session/session_state_delegate.h" |
| 8 #include "ash/shelf/shelf_types.h" | 8 #include "ash/shelf/shelf_types.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/system/tray/system_tray_delegate.h" | 10 #include "ash/system/tray/system_tray_delegate.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 void OverviewButtonTray::SetShelfAlignment(ShelfAlignment alignment) { | 101 void OverviewButtonTray::SetShelfAlignment(ShelfAlignment alignment) { |
| 102 if (alignment == shelf_alignment()) | 102 if (alignment == shelf_alignment()) |
| 103 return; | 103 return; |
| 104 | 104 |
| 105 TrayBackgroundView::SetShelfAlignment(alignment); | 105 TrayBackgroundView::SetShelfAlignment(alignment); |
| 106 SetIconBorderForShelfAlignment(); | 106 SetIconBorderForShelfAlignment(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 void OverviewButtonTray::SetIconBorderForShelfAlignment() { | 109 void OverviewButtonTray::SetIconBorderForShelfAlignment() { |
| 110 if (shelf_alignment() == SHELF_ALIGNMENT_BOTTOM || | 110 if (shelf_alignment() == SHELF_ALIGNMENT_BOTTOM) { |
| 111 shelf_alignment() == SHELF_ALIGNMENT_TOP) { | |
| 112 icon_->SetBorder(views::Border::CreateEmptyBorder( | 111 icon_->SetBorder(views::Border::CreateEmptyBorder( |
| 113 kHorizontalShelfVerticalPadding, | 112 kHorizontalShelfVerticalPadding, |
| 114 kHorizontalShelfHorizontalPadding, | 113 kHorizontalShelfHorizontalPadding, |
| 115 kHorizontalShelfVerticalPadding, | 114 kHorizontalShelfVerticalPadding, |
| 116 kHorizontalShelfHorizontalPadding)); | 115 kHorizontalShelfHorizontalPadding)); |
| 117 } else { | 116 } else { |
| 118 icon_->SetBorder(views::Border::CreateEmptyBorder( | 117 icon_->SetBorder(views::Border::CreateEmptyBorder( |
| 119 kVerticalShelfVerticalPadding, | 118 kVerticalShelfVerticalPadding, |
| 120 kVerticalShelfHorizontalPadding, | 119 kVerticalShelfHorizontalPadding, |
| 121 kVerticalShelfVerticalPadding, | 120 kVerticalShelfVerticalPadding, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 136 shell->maximize_mode_controller()->IsMaximizeModeWindowManagerEnabled() && | 135 shell->maximize_mode_controller()->IsMaximizeModeWindowManagerEnabled() && |
| 137 session_state_delegate->IsActiveUserSessionStarted() && | 136 session_state_delegate->IsActiveUserSessionStarted() && |
| 138 !session_state_delegate->IsScreenLocked() && | 137 !session_state_delegate->IsScreenLocked() && |
| 139 session_state_delegate->GetSessionState() == | 138 session_state_delegate->GetSessionState() == |
| 140 SessionStateDelegate::SESSION_STATE_ACTIVE && | 139 SessionStateDelegate::SESSION_STATE_ACTIVE && |
| 141 shell->system_tray_delegate()->GetUserLoginStatus() != | 140 shell->system_tray_delegate()->GetUserLoginStatus() != |
| 142 user::LOGGED_IN_KIOSK_APP); | 141 user::LOGGED_IN_KIOSK_APP); |
| 143 } | 142 } |
| 144 | 143 |
| 145 } // namespace ash | 144 } // namespace ash |
| OLD | NEW |