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

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

Issue 2886253002: mash: remove more shell/shelf WmWindow usage. (Closed)
Patch Set: Fix WmShelf::ForWindow. Created 3 years, 7 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 | « ash/wm/workspace_controller.cc ('k') | chrome/browser/chromeos/first_run/steps/tray_step.cc » ('j') | 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 0dd1b6c5f30ae4b3afdaa750280aff72ff59173c..dee0d4a29402a6a73ec8ac3c35bbb6ef9969eddb 100644
--- a/chrome/browser/chromeos/accessibility/chromevox_panel.cc
+++ b/chrome/browser/chromeos/accessibility/chromevox_panel.cc
@@ -201,15 +201,10 @@ void ChromeVoxPanel::UpdateWidgetBounds() {
}
void ChromeVoxPanel::SendPanelHeightToAsh(int panel_height) {
- // WmShelf is available for the lifetime of the RootWindowController.
- ash::RootWindowController* root_window_controller =
- ash::RootWindowController::ForWindow(GetRootWindow());
- if (!root_window_controller)
- return;
-
// TODO(mash): Replace with shelf mojo API.
+ ash::WmShelf* shelf = ash::WmShelf::ForWindow(GetRootWindow());
ash::ShelfLayoutManager* shelf_layout_manager =
- root_window_controller->GetShelf()->shelf_layout_manager();
+ shelf ? shelf->shelf_layout_manager() : nullptr;
if (shelf_layout_manager)
shelf_layout_manager->SetChromeVoxPanelHeight(panel_height);
}
« no previous file with comments | « ash/wm/workspace_controller.cc ('k') | chrome/browser/chromeos/first_run/steps/tray_step.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698