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

Side by Side Diff: ash/system/overview/overview_button_tray.cc

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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/overview/overview_button_tray.h" 5 #include "ash/system/overview/overview_button_tray.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_constants.h" 9 #include "ash/common/shelf/shelf_constants.h"
10 #include "ash/common/shelf/shelf_types.h" 10 #include "ash/common/shelf/shelf_types.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 if (alignment == shelf_alignment()) 111 if (alignment == shelf_alignment())
112 return; 112 return;
113 113
114 TrayBackgroundView::SetShelfAlignment(alignment); 114 TrayBackgroundView::SetShelfAlignment(alignment);
115 SetIconBorderForShelfAlignment(); 115 SetIconBorderForShelfAlignment();
116 } 116 }
117 117
118 void OverviewButtonTray::SetIconBorderForShelfAlignment() { 118 void OverviewButtonTray::SetIconBorderForShelfAlignment() {
119 if (IsHorizontalAlignment(shelf_alignment())) { 119 if (IsHorizontalAlignment(shelf_alignment())) {
120 icon_->SetBorder(views::Border::CreateEmptyBorder( 120 icon_->SetBorder(views::Border::CreateEmptyBorder(
121 kHorizontalShelfVerticalPadding, 121 kHorizontalShelfVerticalPadding, kHorizontalShelfHorizontalPadding,
122 kHorizontalShelfHorizontalPadding, 122 kHorizontalShelfVerticalPadding, kHorizontalShelfHorizontalPadding));
123 kHorizontalShelfVerticalPadding,
124 kHorizontalShelfHorizontalPadding));
125 } else { 123 } else {
126 icon_->SetBorder(views::Border::CreateEmptyBorder( 124 icon_->SetBorder(views::Border::CreateEmptyBorder(
127 kVerticalShelfVerticalPadding, 125 kVerticalShelfVerticalPadding, kVerticalShelfHorizontalPadding,
128 kVerticalShelfHorizontalPadding, 126 kVerticalShelfVerticalPadding, kVerticalShelfHorizontalPadding));
129 kVerticalShelfVerticalPadding,
130 kVerticalShelfHorizontalPadding));
131 } 127 }
132 } 128 }
133 129
134 void OverviewButtonTray::UpdateIconVisibility() { 130 void OverviewButtonTray::UpdateIconVisibility() {
135 // The visibility of the OverviewButtonTray has diverge from 131 // The visibility of the OverviewButtonTray has diverge from
136 // WindowSelectorController::CanSelect. The visibility of the button should 132 // WindowSelectorController::CanSelect. The visibility of the button should
137 // not change during transient times in which CanSelect is false. Such as when 133 // not change during transient times in which CanSelect is false. Such as when
138 // a modal dialog is present. 134 // a modal dialog is present.
139 Shell* shell = Shell::GetInstance(); 135 Shell* shell = Shell::GetInstance();
140 SessionStateDelegate* session_state_delegate = 136 SessionStateDelegate* session_state_delegate =
141 WmShell::Get()->GetSessionStateDelegate(); 137 WmShell::Get()->GetSessionStateDelegate();
142 138
143 SetVisible( 139 SetVisible(
144 shell->maximize_mode_controller()->IsMaximizeModeWindowManagerEnabled() && 140 shell->maximize_mode_controller()->IsMaximizeModeWindowManagerEnabled() &&
145 session_state_delegate->IsActiveUserSessionStarted() && 141 session_state_delegate->IsActiveUserSessionStarted() &&
146 !session_state_delegate->IsScreenLocked() && 142 !session_state_delegate->IsScreenLocked() &&
147 session_state_delegate->GetSessionState() == 143 session_state_delegate->GetSessionState() ==
148 SessionStateDelegate::SESSION_STATE_ACTIVE && 144 SessionStateDelegate::SESSION_STATE_ACTIVE &&
149 WmShell::Get()->system_tray_delegate()->GetUserLoginStatus() != 145 WmShell::Get()->system_tray_delegate()->GetUserLoginStatus() !=
150 LoginStatus::KIOSK_APP); 146 LoginStatus::KIOSK_APP);
151 } 147 }
152 148
153 } // namespace ash 149 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc ('k') | ash/system/overview/overview_button_tray_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698