| OLD | NEW |
| 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 Loading... |
| 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 |
| 212 bool userAddingRunning = |
| 213 (ash::Shell::GetInstance()->session_state_delegate()->GetSessionState() == |
| 214 ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY); |
| 215 |
| 211 if (login_ == user::LOGGED_IN_NONE || | 216 if (login_ == user::LOGGED_IN_NONE || |
| 212 login_ == user::LOGGED_IN_LOCKED) | 217 login_ == user::LOGGED_IN_LOCKED || userAddingRunning) |
| 213 return; | 218 return; |
| 214 | 219 |
| 215 views::View* bottom_row = new View(); | 220 views::View* bottom_row = new View(); |
| 216 views::BoxLayout* layout = new | 221 views::BoxLayout* layout = new |
| 217 views::BoxLayout(views::BoxLayout::kHorizontal, | 222 views::BoxLayout(views::BoxLayout::kHorizontal, |
| 218 kTrayMenuBottomRowPadding, | 223 kTrayMenuBottomRowPadding, |
| 219 kTrayMenuBottomRowPadding, | 224 kTrayMenuBottomRowPadding, |
| 220 kTrayMenuBottomRowPaddingBetweenItems); | 225 kTrayMenuBottomRowPaddingBetweenItems); |
| 221 layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_FILL); | 226 layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_FILL); |
| 222 bottom_row->SetLayoutManager(layout); | 227 bottom_row->SetLayoutManager(layout); |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 if (detailed_popup_) | 432 if (detailed_popup_) |
| 428 detailed_popup_->GetWidget()->Close(); | 433 detailed_popup_->GetWidget()->Close(); |
| 429 if (detailed_menu_) | 434 if (detailed_menu_) |
| 430 detailed_menu_->GetWidget()->Close(); | 435 detailed_menu_->GetWidget()->Close(); |
| 431 } | 436 } |
| 432 | 437 |
| 433 previous_accessibility_state_ = accessibility_state; | 438 previous_accessibility_state_ = accessibility_state; |
| 434 } | 439 } |
| 435 | 440 |
| 436 } // namespace ash | 441 } // namespace ash |
| OLD | NEW |