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

Side by Side Diff: ash/system/tray_accessibility.cc

Issue 357323002: Tray elements behave appropriately on the multiple signin screen (more like lock screen) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor fix Created 6 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/tray_accessibility.h" 5 #include "ash/system/tray_accessibility.h"
6 6
7 #include "ash/accessibility_delegate.h" 7 #include "ash/accessibility_delegate.h"
8 #include "ash/metrics/user_metrics_recorder.h" 8 #include "ash/metrics/user_metrics_recorder.h"
9 #include "ash/session/session_state_delegate.h"
9 #include "ash/shell.h" 10 #include "ash/shell.h"
10 #include "ash/system/tray/hover_highlight_view.h" 11 #include "ash/system/tray/hover_highlight_view.h"
11 #include "ash/system/tray/system_tray.h" 12 #include "ash/system/tray/system_tray.h"
12 #include "ash/system/tray/system_tray_delegate.h" 13 #include "ash/system/tray/system_tray_delegate.h"
13 #include "ash/system/tray/system_tray_notifier.h" 14 #include "ash/system/tray/system_tray_notifier.h"
14 #include "ash/system/tray/tray_constants.h" 15 #include "ash/system/tray/tray_constants.h"
15 #include "ash/system/tray/tray_details_view.h" 16 #include "ash/system/tray/tray_details_view.h"
16 #include "ash/system/tray/tray_item_more.h" 17 #include "ash/system/tray/tray_item_more.h"
17 #include "ash/system/tray/tray_popup_label_button.h" 18 #include "ash/system/tray/tray_popup_label_button.h"
18 #include "base/strings/utf_string_conversions.h" 19 #include "base/strings/utf_string_conversions.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 virtual_keyboard_view_ = AddScrollListItem( 202 virtual_keyboard_view_ = AddScrollListItem(
202 bundle.GetLocalizedString( 203 bundle.GetLocalizedString(
203 IDS_ASH_STATUS_TRAY_ACCESSIBILITY_VIRTUAL_KEYBOARD), 204 IDS_ASH_STATUS_TRAY_ACCESSIBILITY_VIRTUAL_KEYBOARD),
204 virtual_keyboard_enabled_ ? gfx::Font::BOLD : gfx::Font::NORMAL, 205 virtual_keyboard_enabled_ ? gfx::Font::BOLD : gfx::Font::NORMAL,
205 virtual_keyboard_enabled_); 206 virtual_keyboard_enabled_);
206 } 207 }
207 208
208 void AccessibilityDetailedView::AppendHelpEntries() { 209 void AccessibilityDetailedView::AppendHelpEntries() {
209 // Currently the help page requires a browser window. 210 // Currently the help page requires a browser window.
210 // TODO(yoshiki): show this even on login/lock screen. crbug.com/158286 211 // TODO(yoshiki): show this even on login/lock screen. crbug.com/158286
211 if (login_ == user::LOGGED_IN_NONE || 212 if (login_ == user::LOGGED_IN_NONE || login_ == user::LOGGED_IN_LOCKED ||
212 login_ == user::LOGGED_IN_LOCKED) 213 ash::Shell::GetInstance()->session_state_delegate()->GetSessionState() ==
214 ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY)
213 return; 215 return;
214 216
215 views::View* bottom_row = new View(); 217 views::View* bottom_row = new View();
216 views::BoxLayout* layout = new 218 views::BoxLayout* layout = new
217 views::BoxLayout(views::BoxLayout::kHorizontal, 219 views::BoxLayout(views::BoxLayout::kHorizontal,
218 kTrayMenuBottomRowPadding, 220 kTrayMenuBottomRowPadding,
219 kTrayMenuBottomRowPadding, 221 kTrayMenuBottomRowPadding,
220 kTrayMenuBottomRowPaddingBetweenItems); 222 kTrayMenuBottomRowPaddingBetweenItems);
221 layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_FILL); 223 layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_FILL);
222 bottom_row->SetLayoutManager(layout); 224 bottom_row->SetLayoutManager(layout);
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 if (detailed_popup_) 429 if (detailed_popup_)
428 detailed_popup_->GetWidget()->Close(); 430 detailed_popup_->GetWidget()->Close();
429 if (detailed_menu_) 431 if (detailed_menu_)
430 detailed_menu_->GetWidget()->Close(); 432 detailed_menu_->GetWidget()->Close();
431 } 433 }
432 434
433 previous_accessibility_state_ = accessibility_state; 435 previous_accessibility_state_ = accessibility_state;
434 } 436 }
435 437
436 } // namespace ash 438 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698