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

Unified Diff: chrome/browser/chromeos/accessibility/accessibility_manager.cc

Issue 1837053003: Accessibility manager shouldn't try to access ash Shelf from login screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update panel height in SetProfile instead Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/accessibility/chromevox_panel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/accessibility/accessibility_manager.cc
diff --git a/chrome/browser/chromeos/accessibility/accessibility_manager.cc b/chrome/browser/chromeos/accessibility/accessibility_manager.cc
index cdf37a793117fb182481dafa6f2c0c9d0ecefed3..d46a28f13721c8738afddeeb39eff08d440d3dc8 100644
--- a/chrome/browser/chromeos/accessibility/accessibility_manager.cc
+++ b/chrome/browser/chromeos/accessibility/accessibility_manager.cc
@@ -1194,6 +1194,11 @@ void AccessibilityManager::SetProfile(Profile* profile) {
UpdateFocusHighlightFromPref();
UpdateSelectToSpeakFromPref();
UpdateSwitchAccessFromPref();
+
+ // Update the panel height in the shelf layout manager when the profile
+ // changes, since the shelf layout manager doesn't exist in the login profile.
+ if (chromevox_panel_)
+ chromevox_panel_->UpdatePanelHeight();
}
void AccessibilityManager::ActiveUserChanged(const AccountId& account_id) {
@@ -1426,9 +1431,14 @@ void AccessibilityManager::OnChromeVoxPanelClosing() {
aura::Window* root_window = chromevox_panel_->GetRootWindow();
chromevox_panel_widget_observer_.reset(nullptr);
chromevox_panel_ = nullptr;
- ash::Shelf::ForWindow(root_window)
- ->shelf_layout_manager()
- ->SetChromeVoxPanelHeight(0);
+
+ ash::Shelf* shelf = ash::Shelf::ForWindow(root_window);
+ if (!shelf)
+ return;
+
+ ash::ShelfLayoutManager* shelf_layout_manager = shelf->shelf_layout_manager();
+ if (shelf_layout_manager)
+ shelf_layout_manager->SetChromeVoxPanelHeight(0);
}
void AccessibilityManager::OnChromeVoxPanelDestroying() {
« no previous file with comments | « no previous file | chrome/browser/chromeos/accessibility/chromevox_panel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698