Pass shelf instances, not root windows, for ash context menus.
Avoid most window->shelf lookup calls; misc cleanup.
Remove some ChromeLauncherController auto-hide functions.
(inline pref lookup function call, context menu ops)
Add Shell::OnShelfAlignmentChanged to revise set pattern.
(support ShelfLayoutManager::SetAlignment, w/o Shell::SetShelfAlignment)
Prerequisite for https://codereview.chromium.org/1760743002
BUG=557406
TEST=No behavior changes or regressions.
[email protected]
Review URL: https://codereview.chromium.org/1812013003
Cr-Commit-Position: refs/heads/master@{#381849}
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 4d021bfe..a2d8219 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -561,7 +561,7 @@
ShellDelegate* delegate = Shell::GetInstance()->delegate();
DCHECK(delegate);
scoped_ptr<ui::MenuModel> menu_model(
- delegate->CreateContextMenu(GetRootWindow(), nullptr));
+ delegate->CreateContextMenu(shelf_->shelf(), nullptr));
if (!menu_model)
return;