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

Unified Diff: chrome/browser/chromeos/accessibility/chromevox_panel.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 | « chrome/browser/chromeos/accessibility/chromevox_panel.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/accessibility/chromevox_panel.cc
diff --git a/chrome/browser/chromeos/accessibility/chromevox_panel.cc b/chrome/browser/chromeos/accessibility/chromevox_panel.cc
index e716e66d4184013672d32e8f560ecbeea0ddd3b9..aff78c5b3d39bc0b346de91d1b4c352e1d3cefb3 100644
--- a/chrome/browser/chromeos/accessibility/chromevox_panel.cc
+++ b/chrome/browser/chromeos/accessibility/chromevox_panel.cc
@@ -109,9 +109,17 @@ void ChromeVoxPanel::Close() {
void ChromeVoxPanel::DidFirstVisuallyNonEmptyPaint() {
widget_->Show();
- ash::Shelf::ForWindow(GetRootWindow())
- ->shelf_layout_manager()
- ->SetChromeVoxPanelHeight(kPanelHeight);
+ UpdatePanelHeight();
+}
+
+void ChromeVoxPanel::UpdatePanelHeight() {
+ ash::Shelf* shelf = ash::Shelf::ForWindow(GetRootWindow());
+ if (!shelf)
+ return;
+
+ ash::ShelfLayoutManager* shelf_layout_manager = shelf->shelf_layout_manager();
+ if (shelf_layout_manager)
+ shelf_layout_manager->SetChromeVoxPanelHeight(kPanelHeight);
}
void ChromeVoxPanel::EnterFullscreen() {
« no previous file with comments | « chrome/browser/chromeos/accessibility/chromevox_panel.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698